Become Our Fan on Social Sites!

Facebook Twitter

Google+ RSS YouTube

Friday 11 April 2014

HTML Heading Tags

In HTML, <h1> to <h6> tags are used for HTML heading. <h1> tag displays text bigger compare to <h2> and <h2> tag displays text bigger compare to <h3> and so on.
html headings
HTML Heading Tags


Never use heading tags for to bold or to make text bigger.

Example:
<body>
   <h1>I am heading 1 </h1>
   <h2>I am heading 2 </h2>
   <h3>I am heading 3 </h3>
   <h4>I am heading 4 </h4>
   <h5>I am heading 5 </h5>
   <h6>I am heading 6 </h6>
</body>

OUTPUT:

I am heading 1

I am heading 2

I am heading 3

I am heading 4

I am heading 5
I am heading 6

Align attribute is used with HTML heading tags. Align attribute contains following values:
  • align='left'
  • align='center'
  • align='right'
  • align='justify'

Align='center' makes text center alignment. Following is an example of center alignment:

<h2 align='center'> I am heading 2 with center alignment</h2>

OUTPUT:

I am heading 2 with center alignment


Align attribute is not working in HTML5.

Heading tags' important use is for Search Engine Optimization - SEO

0 comments :

Post a Comment