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");

Try it yourself

Create Paragraph object

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

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

Try it yourself

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.

Related Pages

HTML Tutorial:HTML Paragraph

HTML Reference Manual:HTML <p> Tag