Hello Every One, Come Join Me To Learn HTML Formatting Tags .

Hello Every One, Come Join Me To Learn HTML Formatting Tags .

ยท

5 min read

HTML Formatting Tags

Formatting Tags are used to format text and makes our document looks pretty good. Because these tags are easily understood just by seeing them. They are all in English words or first letter of the word too.

๐Ÿ˜Š*For Quick Review Go to last page*๐Ÿ˜Š

<b> tag for Bold Text

  • This <b> tag is used to make our text bold. Just by placing <b> tag before the text and </b> close the tag after the text, the text that needs to be made bold must be within <b> and </b> tag. That's it.

      <p><b>Arthur Cayley</b> was the first mathematician.</p>
    

    Output

    Arthur Cayley was the first mathematician.


    <strong> tag for Strong Text

  • This <strong> tag is used to bold the text. This is shown by making the text strong with added semantic importance. It also opens with <strong> and ends with </strong> tag. Both the strong tag and bold inside the tag is of higher importance but search engines understand them differently and will give more preference to strong.

      <p> Acids turns<strong>blue</strong>litmus paper<strong>red</strong>Acid.</p>
    

    Output

    Acids turns blue litmus paper red Acid.


    <i> tag for Italic Text

  • This <i> tag is used to make the text italic. It opens with <i> and ends with </i> tag. For example, the scientific name.

      <p>I got a link to <i>HuffPost</i>.</p>
    

    Output

    I got a link to HuffPost from LinkedIn


    <em> tag for Emphasized.

  • The HTML <em> tag is a semantic tag that is used to make the text italic. . It opens with <em> and ends with </em> tag. It signify that the text inside the tag is being emphasized. It is a semantic tag as opposed to <i>, which doesn't hold any semantic meaning.

      <p>The <em>Lion King</em> is an animated film.</p>
    

    Output

    The Lion King is an animated film.


<u> tag for Underlined.

The HTML <u> tag is a physical tag used to make the text underlined.

    <p> This is <u>underlined</u>using u tag.</p>

Output

This is Underlined using u tag.

<ins> tag for Inserted Text

The <ins>tag is used to underline a text marking the part as inserted or added. It also has an opening and a closing tag. The <ins> tag generally follows some deleted text.

    <p> This file is <del>deleted</del> <ins>inserted</ins>.</p>

Output

This file is deleted inserted.


<del> tag for Text is Deleted

The <del\> tag is used to strike through the text marking the part as deleted. It also has an opening and a closing tag. The <del> tag is a semantic tag used to represent that the text is deleted or changed.

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

Output

  • This file is deleted.


    <strike> tag for Strike Text

    The <strike> tag defines a strike or line through Text. It also has an opening and a closing tag. This tag creates a cut line in the text. Now, the <del> tag is used instead of this tag.

      <p>This answer is<strike> striked </strike>.</p>
    

    Note: This tag is not supported in HTML5, instead of this tag, we can use HTML del Tag or HTML ins Tag or use CSS text-decoration property.

    Output:

    This answer is striked


    <sup> tag for Superscript text

    The <sup> tag is used to create superscript text. The text is placed half a character height above other text and is a size smaller. It also has an opening and a closing tag.

      <p> The formula is (m+n)<sup>2</sup><p>
    

    Output

    This formula is (m+n)2


    <sub> tag for Subscript Text

    The <sub> tag is used to create subscript text. It also has an opening and a closing tag. The text is placed half a character height below other text and is a size smaller.

      <p> The Formula of Cr<sub>2</sub>O<sub>7</sub>.<p>
    

    Output

    The Formula of Cr2O7.


    <big> tag for Big Text

    The <big> tag is a physical tag used to make text one font size larger than the surrounding text. It also has an opening and a closing tag.

      <p> The Mountain is <big>bigger</big>than the tree.</p>
    

    Output

    This Mountain is bigger than the tree.


    <small> tag for Smaller Text

    The <small> tag is used to make the text smaller.The <small> tag is a physical tag used to make text one font size smaller than the surrounding text. The text that needs to be displayed smaller should be written inside <small> and </small> tag.

      <p> Vatican City is <small>smallest</small>country in the world.</p>
    

    Output

    Vatican City is smallest country in the world.


    <pre> tag for Pre Text

    The Preformatted text tag, <pre>, is used to define a block of text to display them in the same manner as it is written in the HTML file. <pre> tag preserves all new lines and white spaces.

      <pre>
        Be    Good
        See    Good
        Do      Good.
      </pre>
    

    Output

    Be Good

    See Good

    Do Good.


    <code> tag for Code Text

    The <code> tag is used to define the piece of computer code. During the creation of web pages sometimes there is a need to display computer programming code. It could be done by any basic heading tag of HTML but HTML provides a separate tag which is <code>.

    The code tag is a specific type of text that represents computer output. HTML provides many methods for text formatting but <code> tag is displayed with fixed letter size, font, and spacing.

      <code> 
        CODE /* Hi This is my code /*
        import calandar
      </code>
    

    Output

    code /* Hi This is my code /*

    import calendar


    Conclusion

  • In this article, we have seen many Formatting tags which are useful in our daily documentation. I recommend you give it a try. Let me know your results! Hope you like this article. ๐Ÿ˜Š๐Ÿ‘


    FOR QUICK REVIEW๐Ÿ˜Š

  • <b> tag - Bold Text

  • <strong> tag - Strong Text

  • <i> tag - Italic Text

  • <em> tag - Emphasized Text

  • <u> tag - Underlined Text

  • <ins> tag - Inserted Text

  • <del> tag - Deleted Text

  • <strike> tag - Strike Text

  • <sup> tag - Superscript Text

  • <sub> tag - SubscriptText

  • <big> tag - Big text

  • <small> tag - Small Text

  • <pre> tag - Pre Text

  • <code> tag - Code Text


    Hello, I'm Bhargavi, if you liked this article, consider sharing it.

    because sharing is caring๐Ÿ˜Š๐Ÿ‘.


ย