HTML formatting tags


HTML (HyperText Markup Language) is the standard language for creating web pages. Formatting tags in HTML are used to format the content of web pages. Below are some common HTML formatting tags along with explanations and examples:

 1. <b>:Bold text

  • Description: Makes the text bold.

Example:

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

2. <strong>: Important text

  • Description: Indicates strong importance, typically rendered as bold.

Example:

      <p>This is an <strong>italic</strong> text.</p>

3. <i>: Italic text

  • Description: Makes the text italic.

Example:

  <p>This is an <i>underlined</i> text.</p>

4. <em>: Emphasized text

  • Description: Indicates emphasis, typically rendered as italic.

Example:

  <p>This is a <em>strikethrough</em> text.</p>

5. <mark>: Marked text

  • Description: Highlights the text.

Example:

  <p>This is a <mark>subscript</mark> text.</p>

6. <small>: Smaller text

  • Description: Decreases the text size.

Example:

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

7. <del>: Deleted text

  • Description: Strikes through the text, indicating deletion.

Example:

  <p>This is a <del>monospaced</del> text.</p>

8. <ins>: Inserted text

  • Description: Underlines the text, indicating insertion.

Example:

  <p>This is a <ins>monospaced</ins> text.</p>

9. <sub>: Subscript text

  • Description: Lowers the text to subscript position.

Example:

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

10. <u>: Underlined text

  • Description: Underlines the text.

Example:

  <p>This is a <u>deleted</u> text.</p>

11. <code>: Inline code

  • Description: Displays text in a monospaced font, typically used for code.
  • Example<code>let x = 10;</code>

Example:

  <p><code>let x = 10;</code></p>

12. <pre>: Preformatted text

  • Description: Displays text in a fixed-width font, preserving whitespace.

Example:

    <p><pre>This text is whitespace</pre></p>

13. <q>: Inline quote

  • DescriptionDefines a short quotation.

Example:

  <q>

    This is a blockquote. It is used for longer quotations.

  </q>

14. <address> :Address

  • Description:Defines contact information for the author/owner of a document.

Example:

  <address>

     Written by Jon Doe.<br>

     Visit us at:<br>

     Example.com<br>

     Box 564, Disneyland<br>

     USA

</address>



15. <sup>: Subscript text

  • Description: Lowers the text to subscript position.

Example:

  <p>H<sup>2</sup>O</p>

16. <br>: Line break

  • Description: Inserts a single line break.
  • ExampleLine 1<br>Line 2

17.  <hr>

  • Description: It can have various attributes like idclassstyle, etc., but it does not require a 
  • Example:

      <p>Sample output: <hr> Hello, World!</p>

    Using these tags allows for comprehensive and versatile text formatting in HTML, enhancing the presentation and readability of web content.








    Post a Comment

    Previous Post Next Post