HTML translateAttributes

HTML 全局属性HTML Global Attributes

Examples

Specify that some elements are not translated:

<p translate="no">This paragraph cannot be translated.</p>
<p>This paragraph can be translated.</p>


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Currently, no mainstream browser supports the translate attribute.


Definition and Usage

The translate attribute specifies whether the content of an element should be translated.

Test: Use the Google Translate tool to see what the following word "ice cream" becomes:

Here we use translate="no":ice cream.

Here we use class="notranslate":ice cream.

Tip:Use class="notranslate" instead.


Differences Between HTML 4.01 and HTML5

The translate attribute is a new attribute in HTML5.


Syntax

<element translate="yes|no">

Attribute Values

Value Description
yes Specifies that the element content should be translated.
no Specifies that the element content should not be translated.


HTML 全局属性HTML Global Attributes Other Extensions