PARAGRAPH TAGS
The paragraph tag in HTML is represented by <p> and is used to define paragraphs of text. It's one of the most commonly used tags for structuring text content on a webpage.
Defining
The <p>
tag is used to format text into distinct paragraphs. Each paragraph element is separated by automatic empty line spaces above and below the content, providing a clear visual separation. The tag must be closed with its corresponding </p>
tag.
app/index.html
1 <p>This is a paragraph of text.</p>
2 <p>This is another paragraph.</p>
Best Practices
It's advisable to use the <p>
tag for textual content and not for layout control. For layout purposes, consider using HTML5 semantic tags like <section>
, <article>
, or CSS techniques.