首页 > 文章列表 > 如何在HTML中指定元素的内容是否应该被翻译?

如何在HTML中指定元素的内容是否应该被翻译?

HTML 元素 翻译
184 2023-09-17

The translate attribute is useful to set that the content of an element is to be translated or not.

The following are the attributes −

AttributeValue

Description

Yes

The content should be translated.

No

The content should not be translated.

If you did not want a specific word to be translated, then add it to the translate attribute −

<p translate = "no">This won’t get translated.</p>