Tutorialspoint.dev

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


This article is attributed to GeeksforGeeks.org

leave a comment

code

0 Comments

load comments

Subscribe to Our Newsletter