In this article we are going to discuss how to remove an underline from a link in HTML. By default the link element comes with underline beneath the text. That's the line we will be removing in this article.
What is an HTML link?
A link is an object of HTML that allows you to bounce to a new location on clicking or tapping the link. It can be attached to texts, images or may be other html elements. By default the link text comes with an blue with an underline.
We will be removing that underline.
For removing an underline from a link in HTML, we need to use inline CSS property that is known as text-decoration, by using this property with the style attribute we can remove the underline from the link because the style attribute identifies an inline style for that component.
So use the style attribute with the inline CSS property which is text-decoration for removing the underline from a link in HTML. Just you have to keep in mind, the usage of style attributes reverses any style set globally. It will nullify any of the style sets in the HTML <style> tag or external style sheet.
<title>HTML Text Decoration</title>
Our <a href="/about/about_team.htm" style="text-decoration: none;">Team</a>
comprises of programmers, writers, and analysts.
Hope this will help.