A simple introduction to Text Formatting in HTML:
HTML Text Formatting: HTML provides a simple format that we will try to cover in this article.
note:
You can identify these elements in a simple way. CSS will provide you with much better font formatting than these elements.
<b> element:
The B element is short for bold and this element is used to grab the reader’s attention.
<strong> element:
Strong Element This element is used for content of great importance and appears in the form of bold text
<i> element:
The i element is an abbreviation of the word italic. This element is used in the names of categories and similar things
<em> element:
The em element is an abbreviation for the phrase Emphasis element. This element is used in texts that need a greater degree of emphasis and appears on the page in italics.
<mark> element:
The mark element is the element that highlights the text written in it in yellow. You can use it for reference things.
<small> element:
The small element is an element that makes the text written in it very small. You can use it in the copyright statement and other similar things.
<del> element:
The del element is short for delete. This element is used in texts that have been deleted from the document. The text in this item appears crossed out in the middle.
<ins> element:
ins is short for inserted text element, and this element is used in text that is added to the document. You can also use the del element next to additional elements in deleted text, and the additional text will appear underlined.
<s> element:
The s-element is short for strikethrough element. The s-element is used for things that are no longer relevant to the document or are no longer accurate. However, it is not appropriate to indicate a process for editing the document. The s element appears with a crossed line in the middle.
<sub> element:
Sub is short for subscript. The sub element is used to show things below the line in small size, such as a chemical formula.
<sup> element:
Sup is short for superscript, The sup element is used for things that appear at the top of the line in a small size, such as exponents.
How to use HTML text formatting?
Note:
These elements are inline elements that you can use together in one paragraph.
An illustrative example of using HTML text formatting:
<body>
<p>
<b>bold text</b>Text<s>Text deleted from the document</s> Text then <del>Changed text</del><ins>Added text</ins> Text then <strong>Alert text</strong> Text, then <i>Distinctive text</i> Text, then <em>Text that needs intense focus</em> Text, then <
small>small text</small> text then x<sub>2</sub> then text x<sup>2</sup>
</p>
</body>
Note: English is not my official language. Mostly I use Google Translate. So, if you encounter a problem or find some errors, you can report the error to me on the Contact Us page or comments, or go to the Mozilla developers website to understand the lesson well, b tag, strong tag, i tag, em tag, mark tag, small tag, del tag, s tag, ins tag, sub tag, sup tag.
Here we have finished. We will see you in the next lesson
Thank you for reading the article and do not forget to share it with friends