HTML Paragraph Tags (<p>)

The <p> tag in HTML is used to produce a paragraph of text. It ranks among the most constantly used tags in HTML. Whenever you apply <p>, the browser automatically inserts some space before and after the paragraph, making it's distinct from girding content.

Syntax


          <p>Your paragraph content goes then.</p>
     

Features

  • Paragraphs are considered block-position elements, meaning they begin on a new line and use the entire range available.
  • browsers automatically apply periphery around paragraphs.
  • You can joint inline formatting (similar as <strong>, <em>) within <p> tags.

Example


     <!DOCTYPE html>
     <html lang="en">
       <head>
         <meta charset="UTF-8">
         <meta name="viewport" content="width=device-width, initial-scale=1.0">
         <title>HTML Paragraph illustration</title>
       </head>
       <body>
         <h1>Learn for My Website.</h1>
         <p>This is the first paragraph of my website. It provides some basic information about the content.</p>
         <p>This is another paragraph. It goes into further detail and information the web page in understanding the content clearly.</p>
       </body>
     </html>
       

Case

Paragraph Output

(This image here showing a browser window with the heading "Learn for My Website" followed by two separate paragraphs with some spacing between them.)

Style Practices

  • Use <p> tags to break your content into fast suitable sections.
  • Stop from using multiple <p> times for distance; conclude for CSS margin or padding instead.
  • Enhance the visual donation of paragraphs by applying CSS styles through class or id attributes.