What is the 'lang' attribute of the <html> tag used for?

前端 未结 5 2199
北海茫月
北海茫月 2020-12-07 22:59

In HTML, it\'s good to have a lang attribute in , e.g. .

How is this useful?

If th

5条回答
  •  醉酒成梦
    2020-12-07 23:07

    The difference between lang and custom attributes is that lang is inherited, so even a child element of an element with attribute lang=en can be selected with the selector div:lang(en){}.

提交回复
热议问题