HTML Paragraphs




HTML Paragraphs

Last Updated Jul 26, 2015, 07:00:08 PM

The HTML p element (or HTML Paragraph Element) represents a paragraph of text.

In the HTML document, the whole content can be presented using paragraphs, like we write the paragraphs in a notebook.

Definition and Usage
Content categories flow content, heading content, palpable content
Permitted content Phrasing content
Tag omission The start tag is mandatory
Permitted parent element Any elements
DOM Interface HTML Heading Element


HTML Paragraph Eaxmple


Try It Now

HTML Multiple Paragraphs

You can have more than 1 paragraph in the html document


Watch GIF Try It Now

HTML Paragraphs with Line Breaks

HTML docuemnts can breaked with <br> tag into seperate line

Watch GIF Try It Now

HTML Paragraphs with Colors

HTML paragraphs can be styled with different colors


Watch GIF Try It Now

In HTML5, the align attribute on <p> is deleted



Note:

It could be tempting to over-use line breaks and br shouldn’t be used if two blocks of text are intended to be separate from one another (because if that’s what you want to do you probably want the p tag)



Paragraphs Bad Practice
Try It Now

Paragraphs Best Practice
Try It Now



Browser Support
Property
Paragraphs (Yes) (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)


Practice with Our Interactive Live Code Editor and Take your HTML Skills to the next level

Exercise 1 Exercise 2 Exercise 3 Exercise 4 Exercise 5

Sources and Credits

The source of the content has been referred and updated with Mozilla Foundation and w3C

Last Updated Jul 26, 2015, 07:00:08 PM