HTML Formatting
HTML Formatting
This is the lesson 5 of 10 in the course HTML - Beginner to Advance

Hy Everyone! In this chapter, we will discuss the HTML formatting tags. HTML Formatting refers to the enhancement of text in order to increase the visual appeal. In simple words, Html Formatting Changes an element that differs from others.
HTML provides us the ability to format text without using CSS.

Table of Contents

HTML Formating Elements

we have a lot of elements for HTML formatting, Let’s discuss them!

HTML <b> Element:

This element makes the text bold. It has a starting <b> and a closing</b> Tag. Everything written between these tags will be bold.

<!DOCTYPE html>
<html>
<body>

<p>This is a default paragraph.</p>
<p><b>This text is a bold paragraph.</b></p>

</body>
</html>

HTML <strong> Element:

The <strong> tag is also like <b> tag but it makes text extra bold than <b> tag. The <strong> also uses a starting and closing tag. Here is an example with <b> and <strong> element.

<!DOCTYPE html>
<html>
<body>

<p>This is a default paragraph.</p>
<p><b>This text is a bold paragraph.</b></p>
<p><strong>This text is a strong paragraph.</strong></p>

</body>
</html>

HTML <small> Element:

It makes the text smaller than other texts. It also has starting and closing tags.

<!DOCTYPE html>
<html>
<body>

<p>This is a default paragraph.</p>
<p><small>This text is a small paragraph.</small></p>

</body>
</html>

HTML <big> Element:

It makes the text larger than other texts. I also have starting <big> and closing </big> tags.

<!DOCTYPE html>
<html>
<body>

<p>This is a default paragraph.</p>
<p><big>This text is a big paragraph.</big></p>

</body>
</html>

HTML <i> Element:

This element changes the text in italic font. It also has starting <i> and closing </i> Tag. Everything written between them will be changed to the italic font.

<!DOCTYPE html>
<html>
<body>

<p>This is a default paragraph.</p>
<p><i>This text is a italic paragraph.</i></p>

</body>
</html>

HTML <em> Element:

The <em> element defines emphasized text. It also makes text italic with added semantics importance.

<!DOCTYPE html>
<html>
<body>

<p>This is a default paragraph.</p>
<p><i>This text is a italic paragraph.</i></p>
  <p><em>This text is a emphasized paragraph.</em></p>

</body>
</html>

HTML <mark> Element:

This element makes text highlighted. It gives text a background color to highlight them.

<!DOCTYPE html>
<html>
<body>

<p>This is a default paragraph.</p>
  <p><mark>This text is a marked paragraph.</mark></p>

</body>
</html>

HTML <del> Element:

This element makes a line through on the text which is written in between starting <del> and closing </del> tag. It shows the deleted texts.

<!DOCTYPE html>
<html>
<body>

<p>This is a default paragraph.</p>
<p>This text is a <del>deleted</del> paragraph.</p>

</body>
</html>

HTML <ins> Element:

This element makes an underline under the text so that can be highlighted.

<!DOCTYPE html>
<html>
<body>

<p>This is a <del>Deleted</del> <ins>Inserted</ins> Paragraph</p>

</body>
</html>

HTML <sup> Element:

The <sup> tag defines superscript text. The font size will be small from others but the superscripted text will be displayed half a character above the normal line. The simplest use of the <sup> tag is to write down the mathematical formula. You can run the example for more details!

<!DOCTYPE html>
<html>
<body>

<p>X<sup>2</sup> Y<sup>2</sup></p>

</body>
</html>

HTML <sub> Element:

The <sub> tag defines subscript text. The font size will be small from others but the text will be displayed half a character below the normal line. the subscript text can be used the write the chemical formula.

<!DOCTYPE html>
<html>
<body>

<p>O<sub>2</sub></p>
<p>H<sub>2</sub>O</p>

</body>
</html>

So here we had learned how the HTML is formated without using CSS. Hope you enjoyed this blog.
If you are interested in coding then follow us on Instagram accounts for more amazing content.

Thank You!

Course Navigation<< HTML QuotationHTML Images >>

Oh, hi there 👋 It’s nice to meet you.

Sign up to receive awesome content in your inbox, every week.

We don’t spam! Read our privacy policy for more info.

Leave a Reply