Web Analytics

HTML Paragraphs

Beginner ~5 min read

The Paragraph Tag

The HTML <p> element defines a paragraph.

A paragraph always starts on a new line, and browsers automatically add some white space (a margin) before and after a paragraph.

HTML
CSS
JS

Line Breaks

The HTML <br> element defines a line break.

Use <br> if you want a line break (a new line) without starting a new paragraph:

HTML
CSS
JS

The Pre Element

The HTML <pre> element defines preformatted text.

The text inside a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks:

HTML
CSS
JS

Quick Quiz

Which tag is used to insert a line break?

A

B
C
D