<q>
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
<q>Quoted Text</q>
q
Demo
He said, This is a great day!
<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.
<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.
<pre>
The <pre> element in HTML shows text while preserving whitespace and line breaks, utilizing a monospace font to keep the formatting as it appears in the source code.
<rb>
The HTML <rb> element defines the base text for a ruby annotation, working with <rt> and <rp> to offer pronunciation or supplementary information for East Asian scripts.