导航
×
   ❮   
HTML CSS JavaScript PHP Go Sass W3C Colors ECMS

HTML Global translate 属性


实例

规定一些元素不被翻译:

<p translate="no">Don't translate this!</p>
<p>This can be translated to any language.</p>

定义和用法

translate 属性规定元素内容是否要翻译。

测试:使用 Google 翻译工具,查看以下单词 "ice cream" 会变成什么:

这边我们使用 translate="no": ice cream.

这边我们使用 class="notranslate": ice cream.

提示: 使用 class="notranslate" 替代。


浏览器支持

属性          
translate 不支持 不支持 不支持 不支持 不支持

语法

<element translate="yes|no">

属性值

描述
yes 规定元素内容需要翻译
no 规定元素内容不需要翻译

相关页面

HTML 教程: HTML 属性


Copyright ©2020-2026 freew3c.com All Rights Reserved 提供的内容仅用于学习和测试,不保证内容的正确性。