Monday, 7 March 2016

HTML Examples

Heading Tags are defined as <h1> to <h6> in HTML there are 6 heading tag.
<h1> heading tag size is so big and <h6> heading tag size is so low

HTML Heading Example   
 <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:- Heading Tag shortcut keys
     h1, h2, h3, h4, h5, h6.
Students must be write heading tags h1, h2, h3, h4, h5, h6. Do not write heading 1, heading 2 means. Do not Write <heading 1> This is a example of heading 1 </heading 1>
This is wrong. H1 means heading Tag 1 long size, h2 means small size, h3 means less then h2 size, h4 means less then h3 size etc
HTML Paragraph Example

<html>
<body>
<p> This is a paragraph example </p>
<p> My name is Sahil Bhatia</p>
<p> I am a App Developer</p>
<p> I am a good Chess Player </p>
</body>
</html>

Output:-

This is a paragraph example

My name is Sahil Bhatia

I am a Teacher

I am a good Chess Player
Note:- Paragraph tag must be write in HTML is <p>
It is necessary </p> paragraph tag start and close paragraph tag</p> 

5)  HTML Line Break
<html>
<body>
<p>This is a <br> my copy <br> its price is<br> Rs 20<br>This is a  example of Line Break</p>
</body>
</html>
OUTPUT

This is a
my copy
its price is Rs 20
This is a example of Line Break
Note:- Break tag do not need to close. Line break tag define as <br>

<br> tag is used for a line break write is same line in Note pad and in output line is automatically in next line

 HTML Link Example
<html>
<body>
<a href ="http://www.karantips.blogspot.com">
This is a link </a>
</body>
</html>
OUTPUT
This is a link


  HTML Bold Text
<html>
<body>
<b>This is a bold text example.</b>
</body>
</html>   
Output:- This is a bold text example

HTML italic, small, sub and super script Example.
<html>
<body>
 <p> <i> This text is italic</i></p>
<p><small>  This text is small </small></p>  <p>this is <sub> subscript</sub>and <sup> this is superscript</sup>
</body>
</html> 
OUTPUT

This text is italic

This text is small

this is subscript and this is superscript


Previous Page 1 HTML HISTORY                 Next page

No comments:

Post a Comment