Today I Learned - Rocky Kev

TIL the global attribute translate

POSTED ON:

TAGS:

translate tells the browser whether the content (its Text node children) should be translated when the page is localized, or whether to leave them unchanged.

A good use-case is if your brand has words that can be translated.

<!-- In English -->
<p>The Dog Company LLC</p>

<!-- In Spanish - default -->
<p>La Compañía de Perros LLC</p>

<!-- In Spanish - with fix -->
<p translate="no">The Dog Company LLC</p>

Related TILs

Tagged:

TIL Gmail has a 102KB size-limit for HTML

PLACEHOLDER

TIL how Error correction works in HTML

You never get an 'Invalid Syntax' error on an HTML page. Browsers fix any invalid content and go on.

TIL what DOCTYPE means

tl;dr: DOCTYPE declaration in the first line of the HTML file, to instruct the browser to run the code in Standard mode.