Block-level
HTML 1.0
The <p> element represents a paragraph of text. It’s one of the most fundamental and commonly used HTML elements for structuring text content on web pages.
Interactive code playground requires JavaScript. Here's the code:
<p>This is a paragraph of text. It groups related sentences together.</p>
<p>This is another paragraph. Each paragraph is separated with spacing.</p>
< p > Your paragraph text goes here. </ p >
The <p> element wraps a block of text, creating a paragraph with automatic spacing before and after.
The <p> element supports all global attributes like id, class, style, and lang.
< p id = " intro " class = " lead-text " style = " color: #333; " >
Important introductory paragraph.
Interactive code playground requires JavaScript. Here's the code:
<h1>Welcome to Our Website</h1>
<p>We are a company dedicated to creating amazing web experiences. Our team has been building websites for over 10 years.</p>
<p>Whether you need a simple landing page or a complex web application, we have the expertise to help you succeed.</p>
Interactive code playground requires JavaScript. Here's the code:
<article>
<h1>The Benefits of Semantic HTML</h1>
<p>Semantic HTML uses elements that clearly describe their meaning to both browsers and developers. This makes your code more readable and accessible.</p>
<p>Using proper semantic elements improves SEO, as search engines better understand your content structure. It also helps screen readers navigate your page more effectively.</p>
<p>Always choose the most appropriate HTML element for your content, rather than using generic divs and spans everywhere.</p>
</article>
Interactive code playground requires JavaScript. Here's the code:
<p>You can include <strong>bold text</strong>, <em>italic text</em>, and <a href="#">links</a> inside paragraphs.</p>
<p>You can also add <code><code></code> elements, <mark>highlighted text</mark>, and <abbr title="HyperText Markup Language">HTML</abbr> abbreviations.</p>
Interactive code playground requires JavaScript. Here's the code:
<section>
<h2>About Our Services</h2>
<p>We offer a wide range of web development services tailored to your needs. From initial concept to final deployment, our team is with you every step of the way.</p>
<p>Our services include:</p>
<ul>
<li>Custom website design and development</li>
<li>E-commerce solutions</li>
<li>Web application development</li>
<li>Website maintenance and support</li>
</ul>
<p>Contact us today to learn how we can help your business grow online.</p>
</section>
Interactive code playground requires JavaScript. Here's the code:
<style>
.styled-paragraph {
font-size: 1.1rem;
line-height: 1.6;
color: #374151;
margin-bottom: 1rem;
}
</style>
<p class="styled-paragraph">
This paragraph has custom styling applied. Notice the font size, line height, and spacing.
</p>
<p class="styled-paragraph">
Consistent paragraph styling improves readability and creates a professional appearance.
</p>
Interactive code playground requires JavaScript. Here's the code:
<style>
.lead {
font-size: 1.25rem;
font-weight: 300;
line-height: 1.7;
color: #4b5563;
}
</style>
<h1>Introduction to Web Development</h1>
<p class="lead">
Web development is the process of building and maintaining websites. It encompasses everything from simple static pages to complex web applications.
</p>
<p>In this guide, we'll explore the fundamental technologies that power the modern web...</p>
Interactive code playground requires JavaScript. Here's the code:
<style>
.drop-cap::first-letter {
font-size: 3.5rem;
line-height: 1;
float: left;
margin-right: 0.5rem;
color: #3b82f6;
font-weight: bold;
}
</style>
<p class="drop-cap">
Once upon a time, in a land far away, there lived a web developer who dreamed of creating the perfect website. This developer spent countless hours learning HTML, CSS, and JavaScript.
</p>
Interactive code playground requires JavaScript. Here's the code:
<p style="text-align: left;">This paragraph is left-aligned (default).</p>
<p style="text-align: center;">This paragraph is centered.</p>
<p style="text-align: right;">This paragraph is right-aligned.</p>
<p style="text-align: justify;">This paragraph is justified. The text spreads out to fill the entire width of the container, creating straight edges on both sides.</p>
< p style = " margin-bottom: 2rem; " > First paragraph with custom spacing. </ p >
< p ></ p > <!-- Don't use empty paragraphs -->
< p > This is actual text content. </ p >
< p style = " display: flex; " > <!-- Don't use p for layout -->
< p > This paragraph contains < strong > bold text </ strong > and < a href = " # " > a link </ a > . </ p >
< p > This paragraph contains
< div > a div </ div > <!-- Block elements can't go in paragraphs -->
Caution
Paragraphs can only contain inline elements (like <a>, <strong>, <em>) and text. Block-level elements (like <div>, <section>, <h1>) are not allowed inside paragraphs.
Screen readers pause between paragraphs, helping users understand content structure:
< p > First thought or idea. </ p >
< p > Second, separate thought or idea. </ p >
Keep line length between 50-75 characters for optimal readability:
Interactive code playground requires JavaScript. Here's the code:
<style>
.readable {
max-width: 65ch; /* ch = character width */
margin: 0 auto;
}
</style>
<p class="readable">
This paragraph has a maximum width set in character units, making it easier to read. Long lines of text can be tiring to read, while very short lines break up the reading rhythm.
</p>
Adequate line height improves readability, especially for users with dyslexia:
Interactive code playground requires JavaScript. Here's the code:
<style>
.good-spacing {
line-height: 1.6; /* 1.5-1.6 is recommended */
}
</style>
<p class="good-spacing">
Proper line height makes text easier to read. The space between lines helps the eye track from the end of one line to the beginning of the next.
</p>
Search engines analyze paragraph content:
<!-- Good: Descriptive, valuable content -->
< p > HTML paragraphs structure text content on web pages. Using proper paragraph elements helps both users and search engines understand your content organization. </ p >
<!-- Avoid: Thin, keyword-stuffed content -->
< p > HTML paragraph. Paragraph HTML. Learn HTML paragraphs. HTML p tag. </ p >
The first paragraph often carries extra SEO weight:
Interactive code playground requires JavaScript. Here's the code:
<article>
<h1>Complete Guide to HTML Paragraphs</h1>
<p>The HTML paragraph element (<p>) is fundamental for structuring text content on web pages. This comprehensive guide covers everything you need to know about using paragraphs effectively.</p>
<p>We'll explore syntax, styling, accessibility, and best practices...</p>
</article>
Use <p> for actual paragraphs of text:
< p > The web is built on three core technologies: HTML for structure, CSS for presentation, and JavaScript for interactivity. </ p >
< p > Each technology serves a distinct purpose, but they work together to create modern web experiences. </ p >
Interactive code playground requires JavaScript. Here's the code:
<p>According to the <cite>HTML Living Standard</cite>, the paragraph element represents a paragraph of content.</p>
<p>"The best way to learn HTML is by doing," said John Doe in his book <cite>Web Development Basics</cite>.</p>
Interactive code playground requires JavaScript. Here's the code:
<p>Published on <time datetime="2025-12-11">December 11, 2025</time></p>
<p>The event starts at <time datetime="14:00">2:00 PM</time> local time.</p>
Interactive code playground requires JavaScript. Here's the code:
<style>
.responsive-text {
font-size: clamp(1rem, 2.5vw, 1.25rem);
line-height: 1.6;
}
</style>
<p class="responsive-text">
This paragraph uses responsive font sizing with clamp(). The text size adjusts based on viewport width, with defined minimum and maximum sizes.
</p>
Browser Version Notes Chrome 1+ Full support Firefox 1+ Full support Safari 1+ Full support Edge 12+ Full support IE 3+ Full support
The <p> element has been supported since the earliest browsers.