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

br

Produces a line break in text content. Use only where the line break is part of the content's meaning.

Description

The <br> element produces a line break in text. It is a void element (no closing tag). Use it only where the line break is an intrinsic part of the content — addresses, poetry, song lyrics — not for visual spacing between blocks.

When to Use

  • Postal addresses: Line breaks between street, city, postal code
  • Poetry and lyrics: Line breaks within stanzas
  • Structured text: Where line breaks carry meaning in the content

When NOT to Use

  • Spacing between paragraphs: Use <p> elements or <layout-stack>
  • Visual gaps: Use CSS margin or gap
  • Separating sections: Use <hr> for thematic breaks

Examples

Use <address> only when the address is contact information for the nearest <article> or for the page as a whole (for example, the author's or organization's contact details). An arbitrary postal address in running content, such as a venue or a shipping address, belongs in a <p>.

Anti-Pattern: Spacing

Never use multiple <br> elements for vertical spacing. Use semantic structure and CSS instead:

CSS and Alternatives

VB adds no styling to <br>. Some alternatives to consider:

  • white-space: pre-line: preserves the line breaks typed in the source while still collapsing other spaces. Handy for poems or text from a database that already contains newlines, without inserting a <br> per line.
  • Separate elements: if each line is its own item (a list of features, the stanzas of a poem), <li> or <p> elements are usually more robust than breaks.
  • The clear attribute is obsolete: <br clear="all"> was used to drop below floats. Use CSS clear: both on the following element instead.

Accessibility

  • Each <br> starts a new line in the reading order, so screen reader users moving line by line hear each address line or verse line separately
  • Consecutive <br> elements produce empty lines, which some screen readers announce as “blank” — noise with no content
  • Use <p> elements for distinct paragraphs so screen readers can navigate by paragraph

Related

  • <p> — Paragraph element (preferred for content separation)
  • <hr> — Thematic break between sections
  • <address> — Contact information for the nearest article or page
  • <wbr> — Word break opportunity (optional break, not forced)
  • <layout-stack> — Vertical spacing between elements
↑