Playing with the Firebug
console, I found that createElement()
return an Element
object which has a lang
attribute.
So you can use:
lang
attribute
var elt = document.createElement("i");
elt.lang = 'fr';
setAttribute()
method
var elt = document.createElement("i");
elt.setAttribute('lang','fr');