Paragraph element – HTML

Preview

To view this and the other 250+ tutorials on Simple Dev, sign up for a 10-day free trial.

Summary

To create a paragraph in HTML, use the p element:

<p>Paragraph text.</p>

To see what this element looks like in the browser, view the Demo section below.

Details

The paragraph element is used to create paragraphs in HTML.

When rendered in the browser, each paragraph element will start on its own line.

<p>This paragraph will start on one line in the browser.</p>

<p>This paragraph will start on another line in the browser.</p>

If a paragraph element contains more text than can be contained on one line, the text will wrap around onto the next line (see the Demo below).

Demo

Exercises

Recreate the embedded CodePen demo by typing out the HTML code in your index.html file (you can skip the really long paragraph element). Then, try customizing the text in the paragraph elements. Try experimenting with different lengths of text inside each paragraph element to see how the text wraps around the page automatically.

References

The Paragraph element on MDN

Lesson tags: Open Lesson
Back to: HTML Course > HTML Body Elements