Class – 07 | Formatting Text in HTML | HTML Tutorial

Formatting Text in HTML - Class - 7
Formatting Text in HTML – Class – 7

HTML (HyperText Markup Language) is the standard language used for creating web pages. The main purpose of HTML is to describe the structure and content of a web page.

Here are some common HTML tags used for formatting text in HTML:

  1. <p> – The <p> tag is used to define a paragraph.
  2. <b> – The <b> tag is used to make text bold.
  3. <i> – The <i> tag is used to make text italic.
  4. <u> – The <u> tag is used to underline text.
  5. <strong> – The <strong> tag is used to make text bold and important.
  6. <em> – The <em> tag is used to emphasize text.
  7. <mark> – The <mark> tag is used to highlight text.
  8. <sup> – The <sup> tag is used to define superscript text.
  9. <sub> – The <sub> tag is used to define subscript text.
  10. <del> – The <del> tag is used to strike-through text.
  11. <hr> – The <hr> tag is used to create a horizontal line.
  12. <br> – The <br> tag is used to create a line break.

Here is an example of how to use these HTML tags to format text:

<p>This is a <b>bold</b> paragraph.</p>
<p>This is an <i>italic</i> paragraph.</p>
<p>This is a <u>underlined</u> paragraph.</p>
<p>This is a <strong>bold and important</strong> paragraph.</p>
<p>This is an <em>emphasized</em> paragraph.</p>
<p>This is a <mark>highlighted</mark> paragraph.</p>
<p>This is a paragraph with <sup>superscript</sup> text.</p>
<p>This is a paragraph with <sub>subscript</sub> text.</p>
<p>This is a paragraph with <del>strikethrough</del> text.</p>
<hr>
<p>This is a paragraph<br>with a line break.</p>

I hope this basic HTML tutorial helps you understand how to format text in HTML!

Next Class

Leave a Comment