Html displaying the link as plain text

I was wondering if you can display the link as plain text.

<a id="" href="" target="_parent"><img src="" width="121" height="20" alt=""> <div style="position:absolute;left:163px;top:1px;font-size: 12px; display: block"> <font color="white">Log in</font></a> 

I am trying to overlay an image, which is also a button, with the text “Login”, it works the same as with the code above, but I was wondering if I can change the “Login”, which displays as blue and underlined so that display as plain text.

+9
source share
8 answers

If you look at cascading style sheets (CSS), you can change the color and style of the link text.

In your example you can use

 <a id="" href="" target="_parent" style="color: white; text-decoration: none;"><img src="" width="121" height="20" alt=""> <div style="position:absolute; sleft:163px;top:1px;font-size: 12px; display: block"> <font color="white">Log in</font> </div> </a> 

However, I would learn to use external style sheets and link them to your HTML via the <link> in the <head> your html. Then you can create individual tags through the tag name, id or css class. Thus, an updated example:

 <link rel="stylesheet" href="link-to-your-css-file" /> 

in your css file there is

 a.imgLink{ color: white; text-decoration: none; } div.imgLink{ position: absolute; left: 163px; top: 1px; font-size: 12px; display: block; } 

Then your html will be

 <a class="imgLink" id="" href="" target="_parent"> <img src="" width="121" height="20" alt=""> <div class="imgLink"> Log In </div> </a> 

Not only does your HTML “dry”, but it also gives you more control over your html styles by just modifying the css file.

+9
source

In css:

 a { color: inherit; text-decoration: inherit; } 

These values ​​may also depend on your style binding attribute.

This should result in your anchor tags looking the same as the color of the text and the decoration of the parent (s).

+34
source

If you do not want the link to be underlined, set "text-decoration: none"

+3
source

The short answer is yes.

Longer answer: Yes, here is a fiddle , but you probably don't want to hide links from your user.

stslavik is great for "text-decoration: inherit". Here is another fiddle . In my browser, “blam” and “stslavic” both show with a break, but I would go with “inherit” compared to “none”; it seems better to me.

+2
source

use this code in your html file

 <style> a { text-decoration: none; color: #000; /* or whatever colour your text is */ } </style> 
+2
source

Of course - just tweak the CSS for the 'a' elements on the page.

0
source

Just a simple snippet to show some size / coloring options so that your link matches thematically when the rest of the text is slightly better.

 <a href="https://www.website.com/">Wow, Look at this website! It called Website! It a shame that this link looks horrible, though!</a> <h2><a style="color: #A52A2A;; text-decoration: none;" href="https://www.website.com/">Oh, boy! You can now click here to visit Website website without the link looking bad!</a></h2> <h2><a style="color: #A52A2A;; text-decoration: none;" href="https://www.bing.com/">Uh oh, the Website website is broken! Visit the pinnacle of innovation, Bing, instead!</a></h2> 
0
source

(PS does not advertise this and does not spam. Click on "AI Hate" to go to my project) You can do this =>

 <h1><a style="text-decoration: none; color: inherit;" href="https://obnoxiousnerd.imtqy.com/hate-ai">Hate AI</a></h1> <p>A personal assistant that hates you but still helps you.</p> 

The logic here was to add style to the tag, which contains the following: -

 text-decoration: none; color: inherit; 

text-decoration to remove the underline under the text. color: inherit to remove the usual magenta color of links.

0
source

All Articles