Jerpl Jerpl - 1 year ago 109
CSS Question

Append declared language to html?

How could I add 'lang="en"' to the end of my opening html tag? I can't just write it in there manually as I don't have access to it (ecommerce package), but I'd like to be able to declare the site language somehow.

Answer Source

You can change the attributes of any element using .attr()


With plain JS, you can also access the <html> element with the documentElement:

document.documentElement.lang = 'en';
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download