0

I want to use any javascript or jquery which on page load will add attribute LANG=EN to the web page. I tried using $('html').attr('name', 'value'); so still i am facing the same issue.

markratledge
  • 17,322
  • 12
  • 60
  • 106
anudeep
  • 1
  • 1

1 Answers1

1

Using jQuery to change the doc type and <html> tag is the absolutely the worst way to do what you need. jQuery rewrites the DOM, not real page source. jQuery is not intended to change such things as <html> tags.

You need to edit the theme you are using. The <html> is being output by your header.php file of the theme. If you really want <html lang="en">, edit header.php.

And read What is lang attribute of the <html> tag used for?

Community
  • 1
  • 1
markratledge
  • 17,322
  • 12
  • 60
  • 106