HTML (HyperText Markup Language) is the standard language for creating web pages. HTML’s primary purpose is to describe a web page’s structure and content.
Here are some common HTML tags used for formatting text in HTML:
- <p> – The <p> tag defines a paragraph.
- <b> – The <b> tag makes text bold.
- <i> – The <i> tag makes text italic.
- <u> – The <u> tag is used to underline text.
- <strong> – The <strong> tag makes text bold and important.
- <em> – The <em> tag is used to emphasize text.
- <mark> – The <mark> tag is used to highlight text.
- <sup> – The <sup> tag defines superscript text.
- <sub> – The <sub> tag defines subscript text.
- <del> – The <del> tag is used to strike-through text.
- <hr> – The <hr> tag creates a horizontal line.
- <br> – The <br> tag creates 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!