HTML <q> Tag
Description
The <q>
HTML tag is used to define a short inline quotation within a document. It is typically employed to enclose a brief, inline quote that is a part of the surrounding text. When the <q>
tag is used, modern web browsers often add quotation marks around the quoted text to visually distinguish it. This tag is particularly useful for ensuring proper semantic markup when quoting text within paragraphs or sentences on a webpage, allowing web developers to maintain the structure and meaning of the content.
Properties
- Permitted Parents
- Any element that accepts phrasing content
- Content
- Block, inline and text
- Start/End Tags
- Start tag: required, End tag: required
Example
<q>You can only be young once. But you can always be immature.</q> (Dave Barry)
Attributes
Attribute | Definition |
---|---|
cite | Indicates the source of 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
Browser Support
The following table will show you the current browser support for the HTML <q>
tag.
Desktop | |||||
12 | 1 | 1 | 15 | 3 |
Tablets / Mobile | |||||
18 | 4 | 14 | 2 | 1 | 4.4 |
Last updated by CSSPortal on: 30th March 2024