What is the purpose of the p tag?

QuestionsQuestions8 SkillsProDec, 25 2025
0121

The <p> tag stands for Paragraph. Its main purpose is to organize and structure your text into distinct blocks.

Here is why we use it:

  1. Grouping Text: It tells the browser that a specific block of text belongs together as a single paragraph.
  2. Automatic Spacing: Browsers automatically add a little bit of vertical space (margin) before and after every <p> element. This makes your content much easier to read compared to one long wall of text.
  3. Readability: Just like in a book or an essay, paragraphs help break up information into manageable pieces for the reader.

When you add the code from this step:

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

The browser will ensure it starts on a new line and remains separated from your <h1> heading.

Give it a try in your index.html file and check the Web 8080 tab to see how the spacing looks

0 Comments

no data
Be the first to share your comment!