Skip to content
Related Articles

Related Articles

Improve Article

HTML <q> Tag

  • Difficulty Level : Basic
  • Last Updated : 21 Jun, 2021

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




<html>
    <body>
         
<p>
          <!-- html q tag is used here -->
          <q>GeeksforGeeks</q>
            A computer science portal for geeks
        </p>
 
    </body>
</html>                   

Output: 
 

Example 2(Use CSS in q tag): 
 



HTML




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

Output: 
 

Supported Browsers: 
 

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

 

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :