HTML & CSS · Junior · Question 75 of 75

Why set the lang attribute on <html>?

<html lang="en">

Explanation

Parts in another language can be marked with their own lang (<span lang="fr">). hyphens: auto relies on lang to hyphenate correctly.

Further reading

Problem with a question

HTML & CSS · Junior · question 75

Test yourself

Take the HTML & CSS · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz