JavaScript Adding an ID attribute to another created Element
You set an element's id by setting its corresponding property:
myPara.id = ID;
Since id is an attribute don't create an id element, just do this:
myPara.setAttribute("id", "id_you_like");
You can use dot notation.
myPara.id = 'anyNameYouLike';