Tonight I had the pleasure of returning to London Web Standards to speak (I was there last April). I presented a deep dive into the lang attribute, a topic for which developers have been begging for a deep dive. Or not.
you can use the :lang psuedo selector to load the correct typeface for the language @aardrian#lwsreturn
.@aardrian is sharing great benefits of using the lang attribute in your HTML: – In-browser spellcheck – CSS selectors like ::first-letter – Translation tools – Font selection for CJK languages pic.twitter.com/XoJH5eKvy1
…more reasons to use lang: – #a11y, e.g. to indicate parts of a page in different language to the rest – Formatting delimiters in number fields – Hyphens for splitting long words (using CSS hyphens: auto;) – Quote marks (with <q> and <blockquote>)#lwsReturn
Leave a Comment or Response