Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

  1. Home
  2. HTML Dictionary
  3. <br> / <wbr> / <ruby>

<br> / <wbr> / <ruby>

Since: HTML5(2014)

br inserts a line break in text, wbr hints to the browser where it may optionally wrap a line, and ruby displays ruby text (phonetic annotations) above characters.

Syntax

<!-- br: line break (void element) -->
Line 1<br>
Line 2

<!-- wbr: optional line-break hint (void element) -->
https://www.example.com/very<wbr>/long<wbr>/url<wbr>/path

<!-- ruby: phonetic annotation -->
<ruby>漢字<rt>Kanji</rt></ruby>

Tag list

TagDescription
brInserts a line break in text. It is a void element and requires no closing tag.
wbrMarks a position where the browser may break the line if needed. No hyphen or other character is shown when no break occurs. No closing tag is required.
rubyThe parent element for ruby-annotated text. It wraps the base text and the rt element together.
rtSpecifies the ruby text (phonetic reading or annotation). Used as a child of ruby.
rpProvides a fallback for browsers that do not support ruby. Typically contains parentheses (e.g., <rp>(</rp>).

Sample code

sample_br_wbr_ruby.html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
</head>
<body>

  <!-- br: line breaks for a poem, address, etc. -->
  <p>
    1-1-1 Marunouchi,<br>
    Chiyoda-ku, Tokyo<br>
    ZIP: 100-0005
  </p>

  <!-- wbr: optional break hint for a long URL -->
  <p>Reference URL: https://wp-p.info/docs<wbr>/html<wbr>/elements<wbr>/ruby</p>

  <!-- ruby: adding phonetic readings (example using Japanese Kanji) -->
  <p>
    <ruby>漢字<rt>Kanji</rt></ruby> means
    <ruby>Japanese<rt>characters</rt></ruby> writing system.
  </p>

  <!-- rp: fallback for unsupported browsers -->
  <p>
    <ruby>汉字<rp>(</rp><rt>Hànzì</rt><rp>)</rp></ruby>
  </p>

</body>
</html>

Output

The br element breaks the address into three lines. The ruby annotation appears in small text above the base characters.

View sample page

Notes

Use br when a line break is meaningful as part of the content — for example in poetry, addresses, or lyrics. Do not use it simply to add vertical space between elements. Use the CSS margin or padding properties for layout spacing instead.

Insert wbr inside long strings that have no spaces, such as long URLs or identifiers. When the container is wide enough, no break occurs and the element has no visual effect. When the width is insufficient, the browser wraps at the marked position.

ruby is especially useful in East Asian language content (Chinese, Japanese, Korean) and anywhere you need to show pronunciation or annotation above characters. The rt element carries the annotation text and, in supporting browsers, is displayed in small text above the base character. Adding rp parentheses as a fallback is a good practice for older browsers that do not support ruby.

Practical Use Cases

A summary of appropriate and inappropriate uses for each tag.

TagAppropriate UseAvoid
<br>Line breaks in poetry, address formatting, email body line breaksMultiple consecutive uses to create paragraph spacing (use CSS margin instead)
<wbr>Controlling line-break opportunities in long URLs, file paths, or identifiersInserting into normal prose (makes text harder to read)
<ruby>Furigana (phonetic readings) for kanji, pronunciation guides for foreign words, learning materialsAdding ruby to every kanji (use only where needed)
<!-- Using br for address formatting -->
<address>
  Anthropic<br>
  548 Market St, PMB 90375<br>
  San Francisco, CA 94104
</address>

<!-- Making a long URL breakable with wbr -->
<p>See details at: https://example.com<wbr>/docs<wbr>/api<wbr>/reference<wbr>/endpoints</p>

<!-- Adding furigana (ruby reading) to kanji -->
<p>
  <ruby>東京<rp>(</rp><rt>とうきょう</rt><rp>)</rp></ruby> is the capital of Japan.
</p>

The <rp> tag inside <ruby> provides a fallback for browsers that do not support ruby. Since all modern browsers support ruby, <rp> is often omitted, but including it ensures the text is still readable in parentheses in non-supporting environments.

Browser Compatibility

Chrome Chrome
1 and later
Firefox Firefox
1 and later
Safari Safari
1 and later
Edge Edge
12 and later
IE IE
11
10
9
8
7
6
Opera Opera
15 and later
14 and earlier ×
iOS Safari iOS Safari
1 and later
Android Android Browser
4.4 and later
4 and earlier ×
Chrome Android Chrome Android
Latest
Same support as desktop version
Firefox Android Firefox Android
Latest
Same support as desktop version

* Version data based on MDN.

If you find any errors or copyright issues, please .