Webpage Workshop: Home » HTML » Paragraphs and lines

Paragraphs and lines

Paragraphs and line breaks are a vital part of ensuring that your text is readable. If all your text simple flowed from top to bottom without any paragraphs, no one would be able to read your pages and no one would want to"

Paragraphs are defined using the paragraph element. This is a block level element, which means that it contains a chunk or block of text. The below example illustrates how paragraphs are used:

<p>Ut wisi enim ad minim veniam, quis nostrud exerci
tation ullamcorper suscipitlobortis nisl ut aliquip
ex ea commodo consequat. Investigationes demonstraverunt
lectores legere me lius quod ii legunt saepius.</p>

Although the closing tag is optional, its use is encouraged. It makes sense for blocks of text to be enclosed within the element, thus there should be a start and end tag.

Line breaks can be used to state that text should start on a new line instead of continuing on the same line as the previous text. They are used like in the example below:

"Hello," said Brucie.<br>
Jerry replied, "Hey, Brucie!"<br>
"How are you, Jerry?" Brucie asked.

In the example above, a new line is started whenever a <br> element occurs. Some people argue that this is a presentational element and so it detracts from the semantics of HTML, but there are occassions when a line break is necessary.

In the next tutorial we will discuss how to emphasise certain words within a text and how different levels of emphasis can be used.

<< Previous page | Next page >>