HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The Paragraph object represents an HTML <p> element
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");
Create a Paragraph Object
You can create a <p> element by using the document.createElement() method:
var x = document.createElement("P");
Property | Description |
---|---|
align | Not supported in HTML5. Use
style.textAlign instead. Sets or returns the value of the align attribute of the paragraph |
The Paragraph object also supports the standard properties and events.
HTML tutorial: HTML Paragraphs
HTML reference: HTML <p> tag