Adding Paragraphs and Text Breaks in HTML

In this lesson, we'll look at paragraphs and text breaks in HTML.

As you have already learned, when rendering the HTML markup, the browser ignores line breaks in the page’s source code. It behaves as if line breaks were single space characters. In many cases, you want to control explicitly where to break lines. HTML provides two tags for this purpose.

The <p> markup designates a paragraph. It surrounds the text and other markups that should be rendered as a single paragraph. The <br/> markup causes the browser to start a new line.

The HTML page shown in Listing 2-9 helps you compare the effect of <p> and <br/>.

Get hands-on with 1200+ tech skills courses.