HTML <q> Tag
The <q> tag is a standard quotation tag and used for short quotation. 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 end tag.
Syntax:
<q> Contents... </q>
Attributes
cite: It contains the value i.e URL which specify the source URL of the Quote.
Below examples illustrate the <q> tag in HTML:
Example 1:
HTML
< html > < body > < p > <!-- html q tag is used here --> < q >GeeksforGeeks</ q > A computer science portal for geeks </ p > </ body > </ html > |
Output:
Example 2(Use CSS in q tag):
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 >GeeksforGeeks</ q > A computer science portal for geeks </ p > </ body > </ html > |
Output:
Supported Browsers:
- Google Chrome
- Edge 12 and above
- Internet Explorer
- Firefox 1 and above
- Opera
- Safari
Please Login to comment...