webdevlinux - logo Web Dev Linux

HTML Paragraphs & Phrasing Contents

In this chapter, you will understand how to use HTML paragraphs and other phrasing contents inside paragraphs.

HTML Paragraphs HTML phrasing contents

Just try out this example and then read the explanation at the page bottom.

FILE :paragraphs.html
<!DOCTYPE html>
<meta charset="utf-8" />
<p>This is a paragraph</p>
<p>Welcome to the <strong>GNU</strong> web design tutorial</p>
<p>Yeah <em>Linux</em> is the <mark>best</mark></p>
<p>Stallman said <q>Facebook is not your friend</q></p>
<p>OMG Linux<br>OMG Android</p>
<p>2<sup>nd</sup> class</p>


Take a look at the explanation of elements used in the example.

The html element is the root element of an HTML document. Permitted contents for this element are one head element & a body element.
The head element can contain one title element and some meta-data (We will discuss what are the meta-data in another lesson). Contents inside the head tags are not displayed on browser window.
The title element represents the document title. Content of this element is displayed on Web browser's Title bar. This can only contains text and not sub- elements.
The body element contains contents of the document which we need to display in the browser window.
The p element represents HTML paragraphs.
The strong element represents importance, seriousness, or urgency
The mark element represents a highlighted text
The em element represents emphasized phrases
The q element represents contents quoted from another source
The br is a void element which has not end tag or contents. This represents a line break.
The hr element is also a void element and it represents a thematic break.
The sub element represents a Subscript
The sup element represents a Superscript