Paragraphs are among the most basic HTML elements. They help logically divide text and clarify the content of a page for both readers and search engines.
The <p> (paragraph) element represents a block of text. Each <p> means a new paragraph, usually rendered by browsers with vertical spacing. In HTML, you should not simply press enter for a new line β every new idea should go in a new <p> element.
Code Details
<p>This is a paragraph of text.</p>
<p>Another paragraph starts here.</p>
Preview
This is a paragraph of text.
To break a line within a paragraph, use the <br> element. It's important to note that <br> doesn't end the paragraph β it only starts a new line.
Always close <p> elements properly. Leaving them unclosed may cause errors or unexpected rendering. Avoid nesting <p> elements inside one another, as it results in invalid HTML.
Use paragraphs whenever a new idea, topic, or point begins. This improves readability and makes the page layout cleaner.
This example shows three separate paragraphs. Each <p> tag starts on a new line and appears in its own block. This helps organize the text clearly on the webpage.
Code Details
<p>Hello! My name is Anna.</p> <p>I like learning HTML.</p> <p>This is my third paragraph.
Preview
Hello! My name is Anna.
I like learning HTML.
This is my third paragraph.
Well-structured content using <p> elements is not only more readable for users but also better optimized for search engines. Clear structure helps indexing and content processing.
β¨ Ask Lara β your AI study partner
Unlock personalized learning support. Lara can explain lessons, summarize topics, and answer your study questions β available from the Go plan and above.
Lara helps you learn faster β exclusive to ReadyTools Go, Plus, and Max members.