how to change lang on html value in javascript code example Example: js change html lang document.documentElement.lang = lang;