New Developers sometimes confuse about head tag or heading tag or header tag in HTML. It is very important to understand over these three HTML tags. So, let’s learn them.
Generally, head tag (<head> …… </head>) is the most important tag in HTML. Head tag contains the most important elements of a website. It contains title tag, meta tag, CSS, Js script, linking with other files, linking to search engines (like Google or Being) and much more. Head tag has an opening and a closing tag……..
It is must for every website to run. Don’t forget to use an opening head tag () and also close it with closing/end tag (.
<title> Site Title </title>
Every developers write HTML codes using heading tag. It is also very important for every web page or post.
Search engines (Google, Yahoo or Being) use heading tags to understand about the topic of the page or past. Search engines bot creole pages or posts to index using the heading tag.
If the page has not any heading tag, it’s valueless to create any content on online.
There are 6 heading tags in HTML. They are, h1, h2, h3, h4, h5 and h6. Remember to contain your page or post headline in h1 tag. You should use some sub-heading in your content using h2 and h3 tags.
<h2> Sub heading</h2>
<h3> Sub heading</h3>
<h4> A little important</h4>
<h5> Less important</h5>
<h6> Nothing to use</h6>
Header tag (<header> …… </header>) is a new tag in HTML 5. It is used for defining the head section of a section or document. A header tag contains header elements of a web page or post. But it is not must to use.
A header tag generally contains heading tags or related with header content. Remember not to use header tag in another header, footer or address tags.
<h1> Main Heading </h1>
<h3> Sub Heading </h3>
<P> Meta Description </p>
Get time to understand the codes of head, heading and header codes in HTML. Want to say again, It’s more then understand to be a better web developer.