HTML Paragraphs


The </p> element in HTML serves to mark a section of text as a paragraph.

Paragraphs format written content into distinct blocks which enhance the page's readability

Syntax

 <p>This is a paragraph of text.</p>
html-paragraph

  • <p> is the opening tag
  • </p> is the closing tag
  • Text in between is the paragraph content

 

notepad

Each </p> tag creates its own block of text with automatic line breaks before and after.


Example

<p>
  This is line one.<br>
  This is line two within the same paragraph.
</p> 

notepad
  • Without CSS styling or special characters (<br />or &nbsp;) browsers will overlook additional spaces and line breaks within a <p>tag.
  • Placing block-level tags such as another <p> within a paragraph produces invalid HTML code.



OnlineTpoint is a website that is meant to offer basic knowledge, practice and learning materials. Though all the examples have been tested and verified, we cannot ensure the correctness or completeness of all the information on our website. All contents published on this website are subject to copyright and are owned by OnlineTpoint. By using this website, you agree that you have read and understood our Terms of Use, Cookie Policy and Privacy Policy.