3 Way to underline Your text in HTML

Share This Post

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

spot_img

Related Posts

Python for Loop Iteration: How to Easily Manipulate a List

One of the most powerful features of the Python...

How To Get First Characters of a String in Python

Way to find the first characters of a string...

How To Convert Tuple To String In Python

In this post, you will learn how to convert...

How To Convert String to Double in Python

Good to hear, that you want to convert a...

Python TypeError: String Index Out Of Range Solution

A string is an array of characters and part...

How To Remove Empty Strings From a List Of Strings

On this page, we will discuss how to remove...
- Advertisement -spot_img