Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

8. Paragraph Tag

Lesson 8 of 30 in the free HTML notes on Siksha Sarovar, written by Rohit Jangra.

Paragraphs

The <p> tag defines a paragraph. It is the most common element for text content.

Characteristics

  1. Block-Level Element: A paragraph always starts on a new line and takes up the full width available.
  2. Automatic Margins: Browsers automatically add white space (margin) before and after a paragraph.

Behavior with Whitespace

HTML ignores extra spaces and line breaks within the code.

  • If you type 10 spaces, the browser displays only 1.
  • If you press "Enter" 5 times in the code, the browser displays it on the same line.

Example of Whitespace collapse:

<p>
  This      text       contains
  many       spaces     and
  lines.
</p>

Output: "This text contains many spaces and lines."

Line Break Tag <br>

To force a line break without starting a new paragraph (and without extra margin), use the <br> tag. <p>Line 1<br>Line 2</p>

Horizontal Rule <hr>

The <hr> tag defines a thematic break in content, typically displayed as a hormonal line. Used to separate chapters or topics.