language_attributes WordPress

For a webpage, the website language is defined with lang attributes in html tag. Search engine easily able to track the content language with this tag. In WordPress many language available to use, so it’s need to dynamically load language attributes in the html tag. The language_attributes WordPress is the function which is dynamically load the language attributes.

For dynamic lang attribute load in WordPress website, we need to use a function in the header.

language_attributes

For dynamically load language_attributes we need to use a function. This function name language_attributes() .In short form it’s also called wordpress lang attribute.

language_attributes() Example

<html <?php language_attributes();?>>