Some tags for Phrasing in HTML 5

Some more Tags for Phrasing elements in HTML 5

 

  • <mark>:- We use this tag for giving special effect to some text such as highlighting it.

    Syntax:

    <mark> text you want to highlight </mark>

    Code:

    <!DOCTYPE HTML />
    <html>
    <body>
    <p> I m mark tag</p>
     I m <mark> formatting </mark> tag
    </body>
    </html>

          
       Output:

       mark.gif

  •  <q>:- We use this tag for providing double 
      quotes to a non quoted short line. That 
      means after using this tag,line will contain
      double quotes. This tag can be used with
      cite attribute. Here, cite attribute will
      indicate a url from where line have come

    Syntax:

    <q> Non-quoted line </q>

    Code:

    <!DOCTYPE HTML />
    <html>
    <body>
    <q cite="http://www.mcnsolutions.net">
    Trusted and Reliable Outsourcing Partner
    </q>
    </body>
    </html>

    Output:
     

          q.gif

  • <s>:- We use this tag for cutting a text which we have provided by mistake in an HTML 5 document. After that, we can replace it with correct text.

    Syntax:

    <s> a line that will contain cut mark. </s>

    Code:

    <!DOCTYPE HTML>
    <html>
    <body>
    <p><s>I m q tag</s> </p>
    <p>I m s tag </p>
    </body>
    </html>

    Output:     

         s.gif

  • <samp>:- We use this tag to show some output text generated by system.

    Syntax:

    <samp> Text generated by
           system</samp>

    Code:

    <!DOCTYPE HTML >
    <html>
    <body>
    <samp> Do you really want to delete all
    files</samp>
    </body>
    </html>
     

    Output:      

          samp.gif

  • <strong>:- We use this tag to give more focus to some text than <em> tag provides.

    Syntax:

    <strong> A text to which we want to give 
    focus more than <em> tag

    Code:

    <DOCTYPE HTML>

    <html>
    <body>
    I m <strong> strong </strong> tag
    </body>
    </html>


    Output:

     

        strong.gif

  • <sub>:- We use this tag to provide a text  at below in HTML 5 document.

         Syntax:

        <sub> Text which we want to provide in
         subscript form </sub>

        Code:

        <!DOCTYPE HTML />
        <html>
        <body>
         I m <sub> sub</sub> tag
        </body>
        <html>
    
        Output:
       sub.gif

  • <sup>:- We use this tag to provide a text at above in HTML 5 document.

        Syntax:

        <sup> Text which we want to provide a text
        at above in HTML 5 document. </sup>


        Code:

        <DOCTYPE HTML>
        <html>
        <body>
         I m <sup> sup </sup> tag
        </body>
        </html>


        Output:


        sup.gif

  • <time>:- We can use it to show a date or time in our document. We can also show date and time both using this tag.

        Syntax:

        <time> time we want to show </time>

        Code:

        <!DOCTYPE HTML>
        <html>
        <body>
         I m time tag. Time is <time> 5:30 </time>  
        </body>
        </html>

        Output:

        time.gif

  • <u>:- This tag is used to show a  text which is underlined.

           Syntax:

         <u> Text we want to show </u>

         Code:

        <!DOCTYPE HTML>
        <html>
        <body>
        <u> I m u tag </u>
        </body>
        </html>

        
        Output:


        u.gif 

  • <var>:- We use this tag for formatting name of text which stores some value.

        Syntax:

        <var> variable name </var>
      

        Code:

        <!DOCTYPE HTML>
        <html>
        <body>
        <v> I m var tag </v>
        </body>
        </html>

        Output:

            var.gif

Ebook Download
View all
Learn
View all