Specifying the Language
ProblemYou want to specify the primary language of your web page.
Solution
Add the lang attribute and appropriate value to your opening html element:
<html lang="en">
Discussion
Browsers, screen readers and other user agents use the lang attribute to know what language the content should be interpreted in. The example above specifies English via the en value.
Declaring a document’s primary language isn’t a requirement for HTML5 or any of the previous versions, for that matter. It is, however, a good practice for both usability and accessibility.
Declaring a document’s primary language isn’t a requirement for HTML5 or any of the previous versions, for that matter. It is, however, a good practice for both usability and accessibility.
No comments:
Post a Comment