Heading, Paragraph, Color, Style


There are six heading tags in HTML. < h1>, <h2>, <h3>, <h4>, <h5>, <h6>. <h1> is most used for heading of the tittle. < h1> size is big, <h2> size is less then <h1> heading tag 1. < h6> is smallest size in HTML. see this example. I will try to explain it. Browser automatically add some empty space in before and after each heading
Heading Tag in HTML
<html>
<body>
<h1>This is a heading 1</h1>
<h2>This is a heading 2</h2>
<h3>This is a heading 3</h3>
<h4>This is a heading 4</h4>
<h5>This is a heading 5</h5>
<h6>This is a heading 6</h6>
</body>
<html>
OUTPUT

This is a heading 1

This is a heading 2

This is a heading 3

This is a heading 4

This is a heading 5
This is a heading 6
Note :- In heading tag must be written in <h1>, <h2> and close in </h1> , <h2> etc. Not write in <heading 1> This is a example of heading 1</heading 1>. This is a wrong.
<p> tag defines a paragraph. Browser automatically some space after and before the paragraph. Do Not forget to close the tags i.e. </>

Paragraph Tag in HTML
<html>
<body>
<p> This is paragraph example</p> <h3> This is example of heading 3</h3>
</body>
</html> 
OUTPUT
This is a paragraph

This is a example of heading 3

Example of heading, paragraph, and font color example

<html>
 <body>
 <h3 style="color:blue">
My name is Sahil Bhatia</h3>
<p style="color:red">
This is a paragraph and font color change Example</p>
<font color ="purple">I am app developer
 </body>
</html>

OUTPUT

My name is Sahil Bhatia

This is a paragraph and font color change Example

I am app developer  

HTML Tutorial                                                                                                    

 
 
 
 

No comments:

Post a Comment