X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML DOM Paragraph Object


Paragraph Object

The Paragraph object represents an HTML <p> element.

Access a Paragraph Object

You can access a <p> element by using getElementById():

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

Create a Paragraph Object

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

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

Paragraph Object Properties

Property Description
align Not supported in HTML5. Use style.textAlign instead.
Sets or returns the value of the align attribute of the paragraph

Standard Properties and Events

The Paragraph object also supports the standard properties and events.


Related Pages

HTML tutorial: HTML Paragraphs

HTML reference: HTML <p> tag



Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook