THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Paragraph Object


Paragraph Object

The Paragraph object speaks to a HTML <p> element.

Access a Paragraph Object

You can get to a <p> component by utilizing getElementById():

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

Create a Paragraph Object

You can make a <p> component by utilizing the document.createElement() method:

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

Paragraph Object Properties

Property Description
align Not upheld in HTML5. Use style.textAlign instead.
Sets or returns the estimation of the adjust characteristic of the paragraph