html tutorial - <q> Short Quotation Tag in HTML - html5 - html code - html form



  • <q> tag is used to define a short quotation.
  • <q> tag supports Global Attributes and Event Attributes.
  • <q> tag belongs to Flow content, phrasing content and palpable content.

Syntax for <q> tag in HTML:

<q>content</q>

Sample Coding for <q> tag:

Tryit<!DOCTYPE html>
<html >
    <head>
        <title>Wikitechy q tag</title>
    </head>
    <body>
        <p>
           <q>Learn</q>to Code in Wikitechy<br> 
           <q>Teach</q>people how different technologies are organized 
           <br> 
           <q>Covers</q>a variety of topics<br> 
           <q>Ranging</q>from advanced beginners to skill levels.
        </p>
    </body>
</html>

Code Explanation for <q> tag:

Short Quotation <q> Tag Code Explanation

  1. <p> tag is used to display paragraph in the html document.
  2. The text inside the <q> tag will be displayed in short quoted text.

Output for <q> tag in HTML:

Short Quotation <q> Tag Output

  1. The words “Learn , Teach , Covers & Ranging” was in short quoted text.

Attribute of <q> tag:

Attribute Value HTML 4 HTML5 Description
cite URL Yes Yes To specify the source URL of the quote.

Browser Support for <q> tag in HTML:

Yes Yes Yes Yes Yes

Tips and Notes

  • Use <blockquote> to mark up a section that is quoted from another source.

Related Searches to quotation tag in html