<rb>

HTML <rb> Tag

The HTML <rb> element delimits the base text component of a <ruby> annotation. Ruby annotations are usually used in East Asian typography. They display the pronunciation of East Asian characters. The <rb> tag is used to separate each segment of the base text.

You must include a <rt> tag for each base element that must be annotated.

Although the <rb> element isn’t an empty element, it is normal to use in the source code only the opening tag of each element, making it easier to read. In the rendered element, the browser can then fill in the full element.

The <rb> tag is one of the HTML5 elements.

Syntax

Syntax

The <rb> tag comes in pairs. The content is written between the opening (<rb>) and closing (</rb>) tags. The closing tag of the <rb> element may be omitted when <rb> is immediately followed by <rb>, <rt>, <rp> or <rtc>, or when there isn’t any content in the parent element.

Example of the HTML <rb> tag:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      body {
        font-size: 30px;
      }
    </style>
  </head>
  <body>
    <ruby>
      <rb>漢</rb>
      <rb>字</rb>
      <rp>(</rp><rt>kan<rt>ji<rp>)</rp>
    </ruby>
  </body>
</html>

Result

The <rb> tag supports the Global Attributes and Event Attributes.



请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部