HTML formatting elements are used to define the appearance of the content on the web page. They can emphasize text, denote strong importance, mark quotations, and more. Here are some key HTML formatting elements with detailed descriptions and examples:

  1. <b>‘ – Bold Text
  • Description: The ‘<b>‘ element is used to draw attention to the text but without implying any extra importance or emphasis.

Example:

				
					<p>This is <b>bold</b> text.</p>

				
			

2. ‘<strong>‘ – Important Text

  • Description: The ‘<strong>‘ element indicates that the text is of strong importance. Browsers typically render this text in bold.

Example:

				
					<p>This is <strong>strongly emphasized</strong> text.</p>

				
			

3. ‘<i>‘ – Italic Text

  • Description: The ‘<i>‘ element is used to display text in an italic style without implying any additional importance or emphasis.

Example:

				
					<p>This is <i>italic</i> text.</p>

				
			

4. ‘<em>‘ – Emphasized Text

  • Description: The ‘<em>' element marks text that has stress emphasis. Browsers usually render this text in italic.

Example:

				
					<p>This is <em>emphasized</em> text.</p>

				
			

5. ‘<mark>‘ – Marked Text

  • Description: The ‘<mark>‘ element highlights or marks text, often with a yellow background.

Example:

				
					<p>This is <mark>marked</mark> text.</p>

				
			

6. ‘<small>‘ – Smaller Text

  • Description: The ‘<small>‘ element renders text in a smaller size compared to the surrounding text.

Example:

				
					<p>This is <small>small</small> text.</p>

				
			

7.’<del>‘ – Deleted Text

  • Description: The ‘<del>‘ element indicates text that has been deleted or removed. Browsers typically render this as strikethrough text.

Example:

				
					<p>This is <del>deleted</del> text.</p>

				
			

8.’<ins>‘- Inserted Text

  • Description: The ‘<ins>‘ element indicates text that has been inserted into a document. Browsers usually render this text with an underline.

Example:

				
					<p>This is <ins>inserted</ins> text.</p>

				
			

9. ‘<sub>‘ – Subscript Text

  • Description: The ‘<sub>‘ element renders text as subscript, which is usually displayed lower and smaller than the main text.

Example:

				
					<p>This is <sub>subscript</sub> text.</p>

				
			

10. ‘<sup>‘ – Superscript Text

  • Description: The ‘<sup>‘ element renders text as superscript, which is usually displayed higher and smaller than the main text.

Example:

				
					<p>This is <sup>superscript</sup> text.</p>

				
			

11. ‘<q>‘ – Short Quotations

  • Description: The ‘<q>‘ element is used for short inline quotations. Browsers usually enclose this text in quotation marks.

Example:

				
					<p>He said, <q>This is a quotation.</q></p>

				
			

12. ‘<cite>‘ – Cited Title

  • Description: The ‘<cite>‘ element represents the title of a work, such as a book, article, or song. Browsers typically render this text in italic.

Example:

				
					<p><cite>To Kill a Mockingbird</cite> is a great book.</p>

				
			

13. ‘<abbr>‘ – Abbreviation

  • Description: The ‘<abbr>‘ element is used to define an abbreviation or acronym. The title attribute can be used to provide the full form.

Example:

				
					<p>The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.</p>

				
			

14. ‘<code>‘ – Code Snippet

  • Description: The ‘<code>‘ element represents a fragment of computer code. Browsers usually render this text in a monospace font.

Example:

				
					<p>Use the <code>printf()</code> function to print text.</p>

				
			

15. ‘<pre>‘ – Preformatted Text

  • Description: The ‘<pre>‘ element preserves whitespace, line breaks, and the formatting of the text. It is typically rendered in a monospace font.

Example:

				
					<pre>
Line 1
Line 2
Line 3
</pre>

				
			

Each of these elements plays a unique role in structuring and emphasizing the content on a web page, helping to convey meaning and enhance readability.

Scroll to Top