tadam logo

HTML5 <q> Tag

Example

Mark up a short quotation:
<p>WWF's goal is to: 
<q cite="http://www.wwf.org">
build a future where people live in harmony with nature
</q> we hope they succeed.</p>
The output of the code above will be:

Browser Support

The <q> tag is supported in all major browsers

Definition and Usage

The <q> tag defines a short quotation.

Browsers often insert quotation marks around the quotation.

Differences Between HTML 4.01 and HTML5

None.

Tips and Notes

Tip: Use the cite attribute to define a reference to where the quotation was taken from.

Tip: Use <blockquote> to mark up long quotations.

Attributes

AttributeValueDescription
citeurlSpecifies a citation for the quotation

Global Attributes

The <q> tag also supports the Global Attributes in HTML5.

Event Attributes

The <q> tag also supports the Event Attributes in HTML5.

Was this information helpful?
   

Comments