Use language_attributes()
, it handles rtl and html or xhtml doctypes, and has a filter that users may want to hook in a child theme.
You can see how they differ in source:
Use language_attributes()
, it handles rtl and html or xhtml doctypes, and has a filter that users may want to hook in a child theme.
You can see how they differ in source: