HTML & CSS · Junior · Question 75 of 75
Why set the lang attribute on <html>?
<html lang="en">- ✓Correct answer: Screen readers pick the right pronunciation, and browsers apply correct hyphenation, quotes and translation prompts
- 2It sets the language of the JavaScript runtime
- 3It's only needed for SEO in Google
Explanation
Parts in another language can be marked with their own lang (<span lang="fr">). hyphens: auto relies on lang to hyphenate correctly.