Related Articles

Related Articles

HTML | <q> Tag
  • Difficulty Level : Basic
  • Last Updated : 18 Jul, 2019

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:

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Output:



Example 2:

filter_none

edit
close

play_arrow

link
brightness_4
code

<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>

chevron_right


Output:

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

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

full-stack-img




My Personal Notes arrow_drop_up
Recommended Articles
Page :