q

Represents an inline quotation with locale-aware quotation marks via VB's i18n system.

Description

The <q> element marks an inline quotation. The browser inserts quotation marks automatically via CSS quotes. VB's i18n system provides locale-specific quotation marks for 11+ languages — English, German, French, Italian, Spanish, Portuguese, Polish, Japanese, Chinese, Korean, Russian, and Arabic.

For longer quotations that require paragraph breaks, use <blockquote>.

When to Use

  • Short quotations: Quotes within running text
  • Attributed speech: "She said..." patterns
  • Multilingual content: Quotes that need locale-correct marks

When NOT to Use

  • For long, block-level quotations — use <blockquote>
  • For titles of works — use <cite>
  • For scare quotes or air quotes — type the quote characters directly

Examples

Locale-Aware Quotes

VB's i18n stylesheet sets the CSS quotes property per language using :lang() selectors. Set lang on the element or any ancestor and the correct quotation marks appear automatically.

Language Outer Inner
English (US)“...”‘...’
English (GB, AU, NZ)‘...’“...”
German„...“‚...‘
French« ... »‹ ... ›
Japanese / Chinese「...」『...』
Russian«...»„...“
Arabic«...»‘...’

CSS Reference

French quotes include narrow non-breaking spaces (\202F) inside the guillemets, matching French typographic convention.

Attributes

AttributeDescription
cite URL pointing to the source of the quotation (not displayed, but available to scripts)
lang Language of the quotation — drives locale-appropriate quote marks

Accessibility

  • Screen readers typically announce the quotation marks the browser inserts
  • The semantic markup distinguishes quoted text from regular content
  • Nested quotes alternate between outer and inner quote styles

Related

  • <blockquote> — For longer, block-level quotations
  • <cite> — For citing the title of a work
  • <bdi> — For isolating quoted text in mixed-direction contexts
  • Internationalization — Full i18n reference with quote tables for all supported languages