Consequences of not using a lang attribute in an html5 html tag

前端 未结 1 1335
一个人的身影
一个人的身影 2021-01-17 11:41

If at the start of my html5 doc I simply use:

how will my site be at a disadvantage for not using something li

相关标签:
1条回答
  • 2021-01-17 12:01

    Good question, but I think most of what you want to know is simple reference:

    http://www.w3.org/TR/html4/struct/dirlang.html

    Some highlights:

    Language information specified via the lang attribute may be used by a user agent to control rendering in a variety of ways. Some situations where author-supplied language information may be helpful include:

    • Assisting search engines
    • Assisting speech synthesizers
    • Helping a user agent select glyph variants for high quality typography
    • Helping a user agent choose a set of quotation marks
    • Helping a user agent make decisions about hyphenation, ligatures, and spacing
    • Assisting spell checkers and grammar checkers

    I don't believe there are any important differences between HTML4 and HTML5 regarding this.

    0 讨论(0)
提交回复
热议问题