HTML Paragraphs

We have learned about what is HTML and how to write HTML elements in previous lessons. Today, I am going to teach how to write HTML paragraphs. Just like a word processing document, in HTML you define a paragraph in a paragraph tag like this <p>. All HTML documents are divided into paragraphs. The HTML <p> element defines a paragraph.

Example:

<p>I am a paragraph.</p>

<p>I am another paragraph.</p>

When a browser renders these paragraphs it automatically adds an empty line before and after a paragraph.

Remember, always close the paragraph with the End Tag. If you forget the end tag can produce unexpected results or errors.

html paragraphs

HTML Line Breaks

The HTML <br /> element defines a line break. Use <br /> if you want a line break without starting a new paragraph.

Example:

<p<I am a paragraph. <br />And I am a new line</p> This code will produce the following paragraph:

I am a paragraph.
And I am a new line

Please note that, the <br /> element is an empty HTML element. It has no end tag.