HTML DOM Paragraph Object
Paragraph object
The Paragraph object represents the HTML <p> element.
Access Paragraph object
You can use getElementById() to access the <p> element:
var x = document.getElementById("myP");
Create Paragraph object
You can use the document.createElement() method to create a <p> element:
var x = document.createElement("P");
Paragraph object properties
Properties | Description |
---|---|
align |
Not supported in HTML5.Please use style.textAlign. Sets or returns the value of the paragraph's align attribute. |
Standard Properties and Events
Paragraph Object Supports StandardsPropertiesAndEvents.