Home  >  Article  >  Web Front-end  >  How to use html ruby ​​tags

How to use html ruby ​​tags

藏色散人
藏色散人Original
2019-05-28 10:10:373470browse

html The ruby ​​tag is used to define ruby ​​comments (Chinese phonetic notations or characters), which are used in East Asia and display the pronunciation of East Asian characters. Use the tag with the and tags: The element consists of one or more characters that need to be interpreted/pronounced and a element that provides that information.

How to use html ruby ​​tags

#html How to use ruby ​​tags?

Tag definition and usage instructions

Tag definition ruby ​​comment (Chinese phonetic or character).

is used in East Asia and displays the pronunciation of East Asian characters.

Use the tag with the and tags:

The element consists of one or more characters that need to be interpreted/pronounced and a Consists of a element that provides this information, and also includes an optional element that defines content to be displayed when the browser does not support the "ruby" element.

Differences between HTML 4.01 and HTML5: The tag is a new tag in HTML5.

Global attributes

tag supports HTML global attributes.

Event attributes

tag supports HTML event attributes.

Example

A ruby ​​comment:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title></title> 
</head>
<body>

<ruby>
  汉 <rp>(</rp><rt>Han</rt><rp>)</rp>
  字 <rp>(</rp><rt>zi</rt><rp>)</rp>
</ruby>

</body>
</html>

Effect output:

How to use html ruby ​​tags

Browser Support: IE 9, Firefox, Opera, Chrome and Safari support the tag.

Note: IE 8 or earlier does not support the tag.

The above is the detailed content of How to use html ruby ​​tags. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to use html rt tagNext article:How to use html rt tag

Related articles

See more