adding an id to a element using js code example Example: add id to element javascript myPara.setAttribute("id", "id_you_like");