Bold Italic & hr tags

<b></b> bold, <i></i> Italic <u></u> underline and <hr>horizontal rule

We have learned how to properly structure an HTML page, different paragraph structures and how to style our text.

Now we are going to learn about the <b> bold tag, <i> italic tag, <u> underline tag and the <hr> horizontal rule tag.

Bold tag
This is a companion tag so remember to place the closing </b> when you are finished with the word/s you want bolded.

This sentence is bolded. The HTML is written as follows;
<p><b>This sentence is bolded</b></p>

Bold a single word in a sentence. The HTML;
<p>Bold a <b>single</b> word in a sentence.</p>

Italic Tag
The <i> italic tag is also a Companion tag so it requires a </i> closing tag as well.

This sentence is italic. The HTML;
<p><i>This sentence is italic.</i></p>

Make a single word in a sentence italic. The HTML;
<p>Make a <i>single</i> word in a sentence italic.</p>

Underline Tag
The <u> underline tag is also a Companion tag so it requires a </u> closing tag as well.

This sentence is underlined. The HTML;
<p><u>This sentence is underlined.</u></p>

Make a single word in a sentence underlined. The HTML;
<p>Make a <u>single</u> word in a sentence underlined.</p>

Horizontal Rule
The <hr> tag is a singular tag and therefore does not require a closing tag. This tag will place a horizontal line (rule) across the page.

Example;
This sentence is placed before the hr tag.


This sentence is placed after the hr tag.

The HTML;


<p>This sentence is placed before the hr tag.</p>
<hr>
<p>This sentence is placed after the hr tag.</p>

Using the above tags go ahead, play around in our editor below so you can see exactly how each one works.