Computer >> Computer tutorials >  >> Programming >> HTML

How to remove underline from a link in HTML?


To remove underline from a link in HTML, use the CSS property text-decoration. Use it with the style attribute. The style attribute specifies an inline style for an element.

Use the style attribute with the CSS property text-decoration to remove underline from a link in HTML. Just keep in mind, the usage of style attribute overrides any style set globally. It will override any style set in the HTML <style> tag or external style sheet.

How to remove underline from a link in HTML?

Example

You can try the following code to remove underline from a link in HTML

<!DOCTYPE html>
<html>
<head>
   <title>HTML Text Decoration</title>
</head>

<body>
   <h2>About</h2>
   <p>
      Our <a href="/about/about_team.htm" style="text-decoration: none;">Team</a>
      comprises of programmers, writers, and analysts.
   </p>
</body>
</html>