Click here to Skip to main content
15,886,551 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
HTML
<h1 align="center" text-decoration="none"> <a href="http://www.youtube.com/user/imedddegamer" color="black" text-decoration="none">  My main Youtube channel </a> </h1>


I want the text in the link to be black and have no decoration but it doesn't work. Some help please?

What I have tried:

I've tried doing this in CSS as well.
a {
text-decoration: none

}

still nothing.
Posted
Updated 26-Mar-16 21:03pm

It just does work. The only problem is probably the understanding of how it should work. You never explained what exactly did you expect from this CSS. Please see: text-decoration — CSS | MDN[^].

For illustration, consider this demo:
HTML
<html>
   <head>
      <title>Text decoration demo</title>
      <style type="text/css">
         a { text-decoration: none; }
      </style>
   </head>
<body>

<a href="http:www.w3.org">W3</a>

</body>
</html>

Render it, and you will see that the anchor text shows no decoration — it is not underlined. Comment out the CSS, and you will see the underlined anchor text, as it should be by default. On "h1", "none" decoration is default (normally), so the same CSS property should not have any effect.

—SA
 
Share this answer
 
v2
to learn HTML and CSS, W3Schools Online Web Tutorials[^]
Link page tuto
HTML Links[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900