Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js create p element with text

var tag = document.createElement("p");
var text = document.createTextNode("This is my text");
tag.appendChild(text);
 
PREVIOUS NEXT
Tagged: #js #create #element #text
ADD COMMENT
Topic
Name
3+8 =