HTML <q> Tag
The <q> tag is a standard quotation tag and is used for short quotations. 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 an end tag.
Syntax:
<q> Contents... </q>
Attributes:
cite: It contains the value i.e URL which specifies the source URL of the Quote.
Example 1: The below example illustrates the <q> tag in HTML:
HTML
< html > < body > < p > <!-- html q tag is used here --> < q >w3wiki</ q > A computer science portal for Beginner </ p > </ body > </ html > |
Output:
Example 2(Use CSS in q tag): The below example illustrates the <q> tag in HTML:
HTML
< html > < head > < title >q tag</ title > < style > q { color: #00cc00; font-style: italic; } </ style > </ head > < body > < p > <!-- html q tag is used here --> < q >w3wiki</ q > A computer science portal for Beginner </ p > </ body > </ html > |
Output:
Supported Browsers:
- Google Chrome
- Edge 12 and above
- Internet Explorer
- Firefox 1 and above
- Opera
- Safari
Contact Us