Thursday, 8 August 2013

Heading tags in HTML:
  • Heading tags mainly used to represent Headings in web pages.
  • Heading tags are 6 types, they are <h1>,<h2>,<h3>,<h4>,<h5> and <h6>.
  • Here heading font-size vary from one heading to another.
Syntax:
                <h1>welcome to heading tags</h1>
                <h2>welcome to heading tags</h2>
                <h3>welcome to heading tags</h3>
                <h4>welcome to heading tags</h4>
                <h5>welcome to heading tags</h5>
                <h6>welcome to heading tags</h6>
Example:
               <html>
                      <head>
                               <title>Headings</title>
                       </head>
                       <body>
                      <h1>Welcome to Heading tag h1</h1>
                      <h2>Welcome to Heading tag h2</h2>
                      <h3>Welcome to Heading tag h3</h3>
                      <h4>Welcome to Heading tag h4</h4>
                      <h5>Welcome to Heading tag h5 </h5>
                      <h6>Welcome to Heading tag h6</h6>
                     </body>
          </html>
output:

  • Output shows that h1 tag is more font size and h6 is least font size.
  • While moving from h1 to h6 the font size decreasing .
  • By our need we will use these heading tags in our web page.
For Demo : click here

0 comments:

Post a Comment