What is the <q> element in HTML?
In HTML, the <q> element is used to display inline text in quotation marks.
Syntax
<q cite=""> quotation content </q>
Where:
cite: TakesURLas its value and specifies the source of the content to be quoted.
- This element should only be used for short quotations without any paragraph breaks. For long quotations with paragraph breaks, you should use the
<blockquote>element.- Modern browsers usually insert quotation marks around the quotation specified by
<q>.
Example
The following code demonstrates the usage of the <q> element in HTML.
The content that we want to display as a quotation is written within the opening and closing tags, <q> and </q>.