HTML <q>
Tag
The HTML <q>
tag is used to indicate a short inline quotation. It is typically styled with quotation marks on both sides.
Here is an example of how the <q>
tag can be used:
<p>This is a <q>short quotation</q> example.</p>
When rendered in a browser, the text "short quotation" would be wrapped in quotation marks, indicating that it is a quotation.
Main Tag Attributes and Uses
Attribute | Description |
---|---|
cite | Specifies the source of the quotation. This is typically a URL where the quotation can be found. |
Here is an example of how the cite
attribute can be used with the <q>
tag:
<p>This is a <q cite="https://www.example.com">short quotation</q> example.</p>
When rendered in a browser, the citation source "https://www.example.com" may be displayed along with the quotation.