Skip to content

Try our new Crash Courses!

Buy one of our new Crash Courses, now hosted on Podia.

Paragraph element – HTML

Demo

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).

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 or just copy and paste it). 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 Reference > HTML Body Elements