Underline Tag
The underline tag <u>
is used in HTML to underline text. It is an effective way to emphasize a part of your content by underlining it.
Here's how it works:
HTMLcopy
<p>This is an <u>underlined</u> word in a sentence.</p>
Result:
This is an underlined word in a sentence.
The <u>
tag was once a go-to method for underlining text. However, with the evolution of web standards, it is now considered a bit outdated for general use, especially when used for emphasizing text that isn't a link.
This is because underlining text with the <u>
tag can sometimes confuse users, as they might mistake it for a hyperlink.
When we reach CSS (Cascading Style Sheet), we will explore a more modern approach to underlining html contents.