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>
<html>
<head>
<meta charset="utf-8" />
<title>Paragraphs</title>
</head>
<body>
<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>
<hr>
<p>H<sub>2</sub>SO<sub>4</sub></p>
<p>2<sup>nd</sup> class</p>
</body>
</html>

Explanation

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

<html></html>
The html element is the root element of an HTML document. Permitted contents for this element are one head element & a body element.
<head></head>
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.
<title></title>
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.
<body></body>
The body element contains contents of the document which we need to display in the browser window.
<p></p>
The p element represents HTML paragraphs.
<strong></strong>
The strong element represents importance, seriousness, or urgency
<mark></mark>
The mark element represents a highlighted text
<em></em>
The em element represents emphasized phrases
<q></q>
The q element represents contents quoted from another source
<br>
The br is a void element which has not end tag or contents. This represents a line break.
<hr>
The hr element is also a void element and it represents a thematic break.
<sub></sub>
The sub element represents a Subscript
<sup></sup>
The sup element represents a Superscript