课程: HTML Essential Training (2020)

今天就学习课程吧!

今天就开通帐号,24,600 门业界名师课程任您挑!

Supporting languages

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…

内容