I am quoting this from W3C:
Declaring language in HTML
Always use a language attribute on the
htmltag to declare the default language of the text in the page. When the page contains content in another language, add a language attribute to an element surrounding that content.
langattribute for pages served as HTML, and the
xml:langattribute for pages served as XML. For XHTML 1.x and HTML5 polyglot documents, use both together.
Use language tags from the IANA Language Subtag Registry.
Also a good read is Why use the language attribute?.