HTML Basics

HTML Bold Tag, Italic Tag and Underline Tag

HTML has other essential tags such bold tag, Italic tag and Underline tag.

Bold Tag

Bold tag is used to set text as bold.

Syntax

<b>Some Text</b>

Output

Some Text

Italic Tag

Italic tag is used to set text as italic

Syntax

<i>Some Text</i>

Output

Some Text

Underline Tag

Underline tag is used to set underline below text

Syntax

<u>Some Text</u>

Output

Some Text

 

Note: we can also nest tags

Example

Stylise a text bold, italic and underline

Solution

<b><i><u>Some Text</u></i></b>

Output

Some Text

Note: The order of the tags are nested. The text is wrapped in underline tag, then with italic tag and then with bold tag. So the order of the closing tags follows the order of closing tag. Otherwise it will not give us result as we have expected.