Vanilla Breeze v0.7.4

Vanilla Breeze v0.7.4 released

0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…

Read the release notes

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 starts from quotes: auto (the browser picks marks for the quotation's language) and pins explicit marks for English, German (incl. Swiss), French, Italian, Spanish, Portuguese (Brazil and Portugal), Polish, Japanese, Chinese (Simplified and Traditional), 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 <q> itself or on any ancestor and the matching quotation marks appear. The nearest lang wins, so a foreign-language quotation inside English text gets its own marks, and a <q lang="en"> inside Japanese text gets English marks.

Language Outer Inner
English (en)“...”‘...’
English (en-GB, en-AU, en-NZ)‘...’“...”
German (de)„...“‚...‘
Swiss German (de-CH)«...»‹...›
French (fr)« ... »‹ ... ›
Italian / Spanish / European Portuguese (it, es, pt-PT)«...»“...”
Portuguese (pt, pt-BR)“...”‘...’
Polish (pl)„...”«...»
Japanese (ja)「...」『...』
Chinese, Traditional (zh-Hant, zh-TW, zh-HK, zh-MO)「...」『...』
Chinese, Simplified (zh, zh-Hans, zh-CN)“...”‘...’
Korean (ko)“...”‘...’
Russian (ru)«...»„...“
Arabic (ar)«...»‘...’
Any other languagequotes: auto — the browser's own table for that language

CSS Reference

French quotes include narrow non-breaking spaces (\202F) inside the guillemets, matching French typographic convention. The same table applies to <cite data-variant="quoted">.

Copy and paste: the marks are generated by CSS (::before / ::after content), so copying a quotation copies the words without the quotation marks. If the marks must survive copying or plain-text export, type them in the text instead of using <q>.

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

  • Whether a screen reader speaks the generated quotation marks depends on its punctuation verbosity setting; do not rely on the marks alone to convey that text is quoted when it matters (say who is speaking in the text)
  • 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
  • lang — Quotation marks follow the language of the quote
  • cite — The source URL of a quotation
↑