3 Way to underline Your text in HTML

making a text underline in HTML, then use <u> tag. This tag <u> deplore in HTML, but then re-initiate in HTML5. Now it represents a text different from another text stylistically, such as a misprinted word.

To underline a text, you also can use the style attribute. The style attribute specifies an inline style for an element. The attribute can be used with the tag of <p> with the CSS property text-decoration.

Just keep in mind, the style attribute usage of overrides any style set globally. It will be  overrule any style set in the HTML <style> tag or external style sheet.

In this article I will tell how to underline your text using <style> attribute and HTML : 

Internal  style attribute

FOR EXAMPLE


<!DOCTYPE html>
<html>
<head>
<title>wholeblogs.com</title>

<style type="text/css">

#underline{

text-decoration: underline;

}

</style>
</head>
<body>

<p id="underline">wholeblogs.com</p>

</body>
</html>

 

The most of the people using this <u></u> in HTML. This is a common way if you write between this tag <u> then the text is already  underlined without doing anything:

The second thing is you can use the <u></u> tag in HTML:

FOR EXAMPLE


<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>

<u>wholeblogs.com</u>

</body>
</html>

Read more: 2 way to change your text font-size in HTML

Leave a Comment