![Remove underline from link CSS [ HTML Anchor Problems ]](https://img.howtoclicks.com/vi_webp/TlXNxvCbDGk/sddefault.webp)
Remove underline from link CSS [ HTML Anchor Problems ]
Remove underline from link CSS [ HTML Anchor Problems ]
Remove underline from link CSS [ HTML Anchor Problems ]
While working with HTML Link / Anchor tags we face Problems or Styling issues where we want to remove underline from link CSS / HTML. Where using Anchor tags we can Insert Links and Using CSS we can style HTML Elements like Styling Link text.
------------------ Video Contents --------------------
0:00 Introduction
0:17 Remove underline from HTML links
0:23 using inline CSS to remove underline
0:32 using CSS text-decoration:none property
0:44 Changing link Color
1:07 using Internal CSS to remove Underlines
1:43 Removing Underline and Changing Color
1:51 Final Results
in short, By using text-decoration:none; in CSS we can remove the underline from a link.
How to remove underline from link in html
To remove underline from link in html, we have to remove the default text decoration from the HTML Link element.
To do that we can use CSS.
There are different ways to Use CSS with HTML but here we are going to use Inline CSS.
style=“text-decoration:none”
Where this text-decoration:none; property will remove all the Default Text Decorations (line Underline) from our Anchor tag.
a{
text-decoration:none;
}
Removing Text Decoration [Underline] Using External CSS
While using External CSS, you just Have to remember your Anchor Tag (Which is A BTW). Keep in mind, if you are using TAG NAME to style your Link Text/Button. Then this will style all the Links that you have included inside your HTML Document.
a{
text-decoration: none;
}
External CSS – Where we will style our Link using CSS
Underline is Removed but Link Color is Still Blue
By using text-decoration: none; we have Removed the Underline, But for changing Text Color we have to use CSS Color Property for that.
Just write the color and then your Color name like Black.
color: black;
CSS Color Property Syntax
style=“text-decoration:none; color:black;”
using Inline CSS
a{
color: black;
}
by using External CSS
Other use of CSS text-decoration property
In this Tutorial, we have to use text-decoration property to remove the underline from Links. But using this Property we can do so much more.
Like we can Add Overline using text-decoration: overline;
we can add line Trough effect using text-decoration: line-through;
we can add Underlines to any HTML text by using text-decoration: underline;
and two effects like underline and overline both using text-decoration: underline overline; CSS Property.
h1 {
text-decoration: overline;
}
h2 {
text-decoration: line-through;
}
h3 {
text-decoration: underline;
}
h4 {
text-decoration: underline overline;
}
I hope this Tutorial Resolved all of your Queries about Remove underline from link CSS [ HTML Anchor Problems ].
Thanks for watching. Have a Great Time.
Content
Source: https://www.youtube.com/watch?v=TlXNxvCbDGk