HTML | <q> Tag

The <q> tag is a standard quotation tag and used for short quotation. The browser normally inserts a quotation mark around the quotation. For longer quotations, the <blockquote> tag must be used since it is a block level element. The <q> tag requires a starting as well as end tag.

Syntax:

<q> Contents... </q>

Below examples illustrate the <q> tag in HTML:

Example 1:

<html>
    <head>
        <title>HTML q tag</title>
    </head>
    <body>
        <p><q>GeeksforGeeks</q
            A computer science portal for geeks
        </p>
    </body>
</html>                    

Output:



Example 2:

<html>
    <head>
        <title>q tag</title>
        <style>
            q {
                color: #00cc00;
                font-style: italic;
            }
        </style>
    </head>
    <body>
    <p><q>GeeksforGeeks</q
    A computer science portal for geeks
    </p
    </body>
</html>

Output:

Supported Browsers: The browser supported by <q> tag are listed below:

  • Opera
  • Internet Explorer
  • Google Chrome
  • Firefox
  • Apple Safari


My Personal Notes arrow_drop_up

I am a technology enthusiast who has a keen interest in programming. I am pursuing Engineering in Computer Science from GEU, Dehradun. I like to unwind by watching movies and English sitcoms.I have a keen interest in music.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.