HTML Tags for Bold, Italic and Underline
In this article, we will explore the basic HTML tags to format our text on the web. We will learn how to make bold, italic, and underlined text using HTML, and we will also see if we can mix these tags with H1 and H2 headings.
Tag for bold: <b></b>
The <b> tag is used to make text bold. For example:
This text will be bold
In addition, we can also use the <strong> tag to make text bold. The difference between <b> and <strong> is that <strong> is used to indicate that the text is important or has a special meaning.
Tag for italic: <i></i> and <em></em>
The <i> tag is used to make text italic. For example:
This text will be italic
Just like with bold, we can also use the <em> tag to make text italic. The difference between <i> and <em> is that <em> is used to indicate that the text has emphasis or a special meaning.
This text will also be italic and is considered emphasized
Tag for underline: <u></u>
The <u> tag is used to underline text. For example:
This text will be underlined
Mixing tags with H1, H2, and H3 headings
Yes, we can mix the bold, italic, and underline tags with H1 and H2 headings. For example:
<h3><b>This heading will be bold</b></h3>
<h3><b><i>This heading will be bold and italic</i></b></h3>
<h3><b><i><u>This heading will be bold, italic, and underlined</u></i></b></h3>
This heading will be bold
This heading will be bold and italic
This heading will be bold, italic, and underlined
In this way, we can format our headings and text to make them more attractive and easier to read.
In summary, we have learned how to use HTML tags to make text bold, italic, and underlined. We have also seen that we can mix these tags with H1 and H2 headings to format our headings and text. With these basic tools, we can start creating more attractive and easy-to-read web content.