Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. HTML
  3. Reference
  4. Global attributes
  5. translate

HTML translate global attribute

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨March 2023⁩.

Thetranslateglobal attribute is anenumerated attribute that is used to specify whether an element'stranslatable attribute values and itsText node children should be translated when the page is localized, or whether to leave them unchanged.

It can have the following values:

  • empty string oryes, which indicates that the element should be translated when the page is localized.
  • no, which indicates that the element must not be translated.

Although not all browsers recognize this attribute, it is respected by automatic translation systems such as Google Translate, and may also be respected by tools used by human translators. As such it's important that web authors use this attribute to mark content that should not be translated.

Examples

In this example, thetranslate attribute is used to ask translation tools not to translate the company's brand name in the footer.

html
<footer>  <small>© 2020 <span translate="no">BrandName</span></small></footer>

Specifications

Specification
HTML
# attr-translate

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp