Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

create new element

// Create element:
const para = document.createElement("p");
para.innerText = "This is a paragraph.";

// Append to body:
document.body.appendChild(para);
 
PREVIOUS NEXT
Tagged: #create #element
ADD COMMENT
Topic
Name
1+6 =