function addParagraph(text) {
// Create a new <p> element
var paragraph = document.createElement("p");
// Set the text content of the <p> element
paragraph.textContent = text;
// Append the new <p> element to the body of the document
document.body.appendChild(paragraph);
}
// Usage example:
addParagraph("This is a dynamically added paragraph.");
test
hello
p {
color : red;
}