hotohoto
hotohoto

Reputation: 487

What if `lang` attribute is overlapped?

Is it ok to overlap lang attribute like below?

  <div lang='ko'>
    <div lang='en'>
      Hello!
    </div/>
    <div>
      Some messages in Korean here.
    </div>
  </div>

What would the standard say about this?

Upvotes: 1

Views: 45

Answers (1)

Brad
Brad

Reputation: 163538

Yes, this is acceptable.

https://www.w3.org/TR/html5/dom.html#attr-lang

If an element doesn't have an lang attribute, it will use the parent element's language.

Upvotes: 1

Related Questions