Text Formatting in HTML

HTML Tags

Hello Coders and Friends,

Different tags that are useful for text formatting in HTML along with their syntax are

● <strong>: Makes text bold.

● <b>: Makes text bold.

● <em>: Italicizes text.

● <i>: Italicizes text

● <u>: The <u> tag in HTML is used to underline text.

● <s>: Strikes through text.

● <strike>: Strikes through text.

● <sub>: Makes text subscript.

● <sup>: Makes text superscript.

● <small>: Makes text small.

● <big>: Makes text big.

● <mark>: Highlights text.

● <abbr>: Represents an abbreviation.

● <acronym>: Represents an acronym. (Not Supported)

● <dfn>: Represents a definition in italic form.

● <ins>: The <ins> tag in HTML is used to represent inserted text with underline.

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Text Formatting Tags</title>
</head>
<body>

    <h1>Text Formatting In HTML</h1>
   <!-- ● <strong>: Makes text bold.
        ● <b>: Makes text bold.
        ● <em>: Italicizes text.
        ● <i>: Italicizes text -->

    <div>strong and em tags are useful for screen reader in modern technology</div>

    <p>Note that the <strong>strike element</strong>  is deprecated <em>in HTML5 and may not be supported</em>  
    in all modern web browsers. It is generally recommended to use other text
    formatting techniques, such as the text-decoration CSS property, to achieve the
    same effect</p>


<!-- 
        ● <u>: The <u> tag in HTML is used to underline text.
        ● <s>: Strikes through text.
        ● <strike>: Strikes through text.

        Note that the <strike> element is deprecated in HTML5 and may not be supported
        in all modern web browsers. It is generally recommended to use other text
        formatting techniques, such as the text-decoration CSS property, to achieve the
        same effect.
     -->

     <p> Note that the <s>strike element</s>  is <u>deprecated in HTML5 and may not be supported</u> 
        in all modern web browsers. It is generally recommended to use other text
        formatting techniques, such as the text-decoration CSS property, to achieve the
        same effect.</p>

     <!--   ● <sub>: Makes text subscript.
            ● <sup>: Makes text superscript.
            ● <small>: Makes text small.
            ● <big>: Makes text big.
        -->

        <div> H <sub>2</sub> O
        </div>

        <p> Makes text  <small>small .</small>  Makes text <big>big.</big></p>

        <div>a<sup>2</sup>
        </div>

        <p>Text Formatting</p>

       <!-- ● <mark>: Highlights text.
            ● <abbr>: Represents an abbreviation.
            ● <acronym>: Represents an acronym. (Not Supported)
            ● <dfn>: Represents a definition in italic form.
            ● <ins>: The <ins> tag in HTML is used to represent inserted text with underline. -->

        <div> dfn and ins tags are useful for screen reader in modern technology</div>
        <p>
            mark tag is used to <mark>Highlight Any text</mark> 

        </p>

        <div>
            abbr is used to represent the full form of any text. 

            <!-- <abbr title="Full Form">Short Form</abbr> syntax of abbr -->

            <p>
            when we hover the cursor on that dotted text then it will show its full form &nbsp;
                <abbr title="Hyper Text Markup Language"> HTML </abbr> <br>
                <dfn>HTML is a hyper text markup Language. </dfn> 
                Lorem ipsum <s>dolor </s>  sit amet consectetur. <ins>it inserts the text.</ins> adipisicing elit. Eveniet, nam non. Ipsa beatae repellat nisi!
            </p>  
        </div>



</body>
</html>