Paragraphs and Headings

 

Paragraph:
The paragraph tag is used to begin the text in a new paragraph. Paragraphs are defined with the <p> tag.

 

Syntax:
<p> paragraph content </p>

 

Example:
<html>
<body>
<p>
My Bonnie lies over the ocean. My Bonnie lies over the sea. My Bonnie lies over the ocean. Oh, bring back my Bonnie to me.
</p>
<p>Note that your browser ignores the layout in the HTML source code!</p>
</body>
</html>

 

Output:

Headings:
Every page begins with head. The six html heading styles are used among different parts of the page. <h1> defines the most important heading. <h6> defines the least important heading.

 

Syntax:
<hn> ……… </hn>

 

Example:
<html>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>
Output:

 

 

 

 

 

Hyper text markup language by deepa & suriya