<q>

The <q> element in HTML is used for inline quotations, usually rendered with quotation marks, to indicate a brief citation or excerpt within the surrounding text.

q tag

The <q> element in HTML is designed for short inline quotations. Browsers often render text inside this tag with quotation marks, though styling may vary based on browser settings and regional preferences.

Syntax

index.html
<q>Quoted Text</q>

q Demo

He said, This is a great day!

index.html
<p>
  He said, <q>This is a great day!</q>
</p>

Definition and Usage

The <q> tag is used to indicate short quotations, and browsers generally wrap the content with quotation marks automatically.

For extended quotations, consider using the <blockquote> tag.

See also

  • The <blockquote> element for longer quotations.
  • The <cite> element for referencing sources.

Conclusion

The <q> tag in HTML is intended for brief inline quotations, with browsers automatically applying quotation marks. It enhances the readability and structure of content while providing semantic meaning for accessibility and search engines. When quoting longer passages, the <blockquote> tag should be used for better formatting and clarity.