HTML5 translate attribute: controlling content translation

geeksforgeeks.org

The HTML5 translate attribute specifies whether an element's content should be translated, and it applies to all HTML elements. It accepts two values: "yes" to allow translation and "no" to prevent it. The attribute is written as `<element translate="yes|no">` and is new in HTML5. For example, a paragraph marked with `translate="no"` will not be translated, while one without this setting or marked "yes" remains translatable. This feature gives developers control over which content appears in machine-translated versions of a page, useful for preserving proper names, code snippets, or legally binding text. The attribute works across all HTML elements, making it a versatile tool for internationalization.


With a significance score of 3.1, this news ranks in the top 12% of today's 32794 analyzed articles.

Get summaries of news with significance over 5.5 (usually ~10 stories per week). Read by 10,000+ subscribers: