Bold, italic and underline tags in HTML

To format content, bold, italic and underline tags are used. You can do it via CSS or using HTML tags. We will learn it via HTML tags.

Bold Text

To make any content bold, put it between <b> and </b>.

This is the line which has Bold word.


<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p>
            This is the line which has <b>Bold</b> word.
        </p>
    </body>
</html>
                        

Italic Text

To make any content italic, put it between <i> and </i>.

This is the line which has Italic word.


<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p>
            This is the line which has <i>Italic</i> word.
        </p>
    </body>
</html>
                        

Underlined Text

To make any content italic, put it between <u> and </u>.

This is the line which has underlined text word.


<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p>
            This is the line which has <u>underlined text</u> word.
        </p>
    </body>
</html>
                        

Conclusion

In this section, you have learned about formatting the content. There are many ways to format text in HTML.
In next section, you will learn about strike, superscript and subscript text in HTML.