Favorites

HTML translate Global Attribute

translate
HTML Global AttributeThis global attribute is supported by all modern browsers.
Updated 22nd November 2026

The translate attribute sets whether the content of an element should be translated by browser translation tools: yes or no, such as for brand names or code.

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.

Description

The translate global attribute in HTML is used to specify whether the content of an element should be translated when the page is localized. It is an enumerated attribute that can have the following values:

  • An empty string or yes: The element will be translated when the page is localized.
  • no: The element will not be translated when the page is localized.

The translate attribute can be used with any HTML element. It is especially useful for marking content that should not be translated, such as:

  • User-generated content, such as comments or forum posts
  • Trademark names or slogans
  • Technical terms
  • Code snippets

The translate attribute is respected by the built-in translation features of browsers and by services such as Google Translate, and may also be respected by tools used by human translators. The value is inherited, so translate="yes" can switch translation back on inside an element with translate="no". As such, it's important that web authors use this attribute to mark content that should not be translated.

Here is an example of how to use the translate attribute:

<p translate="no">This text will not be translated.</p>

If a user is viewing the page in a different language, the text in the <p> element will remain in the original language.

The translate attribute is a valuable tool for creating multilingual websites and applications. It allows web authors to ensure that their content is translated accurately, and that important information is not lost in translation.

Syntax

<element translate="yes | no">

Values

  • yesTells the browser that the content of the element should be translated. An empty string has the same meaning.
  • noTells the browser that the content of the element should not be translated.

Example

<p translate="no">Content of the element should not translated.</p> 
<p translate="yes">Content of the element should be translated.</p>
Open in editor

Browser Support

The following information will show you the current browser support for the HTML translate global attribute. Hover over a browser icon to see the version that first introduced support for this HTML global attribute.

This global attribute is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.