HTML DOM Paragraph Object | HTML Paragraph Tag |

HTML DOM Paragraph Object


Javascript DOM Paragraph Object

PreviousNext
 

The Paragraph object represents an HTML <p> element.

Access a Paragraph Object

 

Copy

let x = document.getElementById("myP");


Open in separate window
View full source code

Create a Paragraph Object

You can create a <p> element by using the document.createElement() method:

Copy

let x = document.createElement("P");


Open in separate window
View full source code

PreviousNext

Related