html translate attribute
The translate attribute on the html element:
- → indicates that the content is translatable
- is a global attribute → can be applied on all html elements;
- when applied on the root element <html>, its value is inherited by all other html elements
Examples
<html | attribute | = | "value(s)" | > | ... | <⁄html> | example |
---|---|---|---|---|---|---|---|
21. | translate | = | "", yes, no | <translate=""> ... <⁄ > <translate="yes"> ... <⁄ > <translate="no"> ... <⁄ > |
Video demonstration html translate attribute
HTML5 html translate attribute Tutorial
min | video details |
---|---|
00:07 | test1: no "translate" attribute specified on the html root element, → the page's content is translated in french by Google translate |
00:35 | test2: "translate" attribute, value: empty string applied on the html root element, → the page's content is translated in french by Google translate |
01:00 | test3: "translate" attribute, value: yes applied on the html root element, → the page's content is translated in french by Google translate |
01:25 | test4: no "translate" attribute on html element; "translate" attribute value:no on an h1 element → the page's content is translated in french except the content of h1 element |
02:12 | test5: "translate" attribute, value: no applied on the html root element → the page's content is NOT translated in french by Google translate |