I have some code here that will do the following. The code creates an element \"p\" then I append it to a \"div\" in the HTML. I would like that \"p\" I just created have an
Since id is an attribute don't create an id element, just do this:
myPara.setAttribute("id", "id_you_like");