Recently I’ve learned that setting the charset using the meta tag is a pretty sub-standard way of doing things since we should instead set the charset in the server side like this:
header( 'Content-type: text/html; charset=utf-8' );
Does this concept also applies to the lang attribute of the html tag?
If so, what’s the php way of setting the lang attribute of a document?
Try the Content-Language header.