HTML q Tag

HTML<q>Tag: The HTML<q>tag specifies a short quotation. And 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.

HTML<q>Tag

This HTML q tag supports both the global and the event attributes.

Syntax: <q> Text </q>

Browser compatibility

The HTML q tag is supported by different types of browsers.

  • Chrome
  • Firefox
  • Opera
  • Safari
  • Internet Explorer

Example:

<html> 
    <head> 
  <title>q tag</title> 
  <style> 
    q { 
       color: #00cc00; 
       font-style: italic; 
      } 
  </style> 
  <body>
  <p><q><b>Frehersnow tutorial</q></b> 
helps you in gaining knowledge
We hope you succeed.</p>
</body>
</html>

Output:

html q tag

 

Attributes that are supported by the <q> tag

Attribute Value Description
cite URL Specifies the source URL of the quote