From the course: HTML Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Supporting languages

Supporting languages - HTML Tutorial

From the course: HTML Essential Training

Supporting languages

- The web, by its very nature, is global. We humans speak hundreds of different languages. There are several tools in HTML we want to use to make sure it's clear which language our content is in. If we set up things properly, search engines will know when to list our sites in which language. The right dictionaries will show up for the spell checkers. When content is read aloud by a browser, it's more likely that the words will get pronounced properly. We want computers who are involved to know which language the content is in. The lang attribute is what we use to do this. If our whole page is in the same language, then it's pretty simple. We can set the language on the outermost element that wraps all the other elements which, as we'll talk about more in chapter eight, is the HTML element. You may only need to set this once, perhaps in a template file that propagates to the whole site. Just don't forget. In this…

Contents