Learn The Bold Italic And Underline Tags In Html

Hey guys!! Today we are going to learn the bold italic and underline tags in html.

Learn The Bold Italic And Underline Tags In Html

I have a file here in text editor,

<!DOCTYPE html>
<title>Learn The Bold Italic And Underline Tags In Html</title> </head>
<p><b>This sentence is in bold.</b></p>
<p><i>This sentence is in italic.</i></p>
<p><u>This sentence is underlined.</u></p>

In the body section i have three paragraphs and the first paragraph has a text “This sentence is in bold”.

The second paragraph has the text this will be in italic and the third paragraph will have the text “This sentence is underlined”.

So there are three paragraphs and let me show you guys how the page looks when i open it in google chrome,

Learn The Bold Italic And Underline Tags In Html

This is how it looks and you know it’s very obvious that the style in which the text is presented in each paragraph is different.

The first paragraph has text all in bold, the second one has text in italic and third one is underlined. The way you achieve above (example) is very simple.

Also Read – HTML Headings Example

As you can see code in the text editor, to have text in bold you have to use the “b” tag.

You just have to put in the alphabet “b” just as you use the alphabet “p” for paragraph.

You use the alphabet “b” for bold. So you have the opening “b” tag and the closing “b” tag between the opening and closing “p” tag. This will give you the bold effect.

To have the italic effect you have to use the alphabet “i”. So it’s the “i” tag and then to have the effect of the underlined effect you have to use the alphabet “u”.

After the paragraph tag you have the opening underline tag and then you have the closing underline tag and the closing paragraph tag.

Remember that the sequence has to be opposite. So you have “p” as the opening tag here in “u” as a second tag.

So you have to close it in the reverse way. You first have the closing “u” tag and then the closing “p” tag.


So that’s about bold, italic and underline tag in html. I hope you have understood the above three tags.

You May Also Like