/ / What is in the HTML header?

What is the HTML header?

When working with the site the first of the tags with whichencounters a programmer in HTML, -

. When using it with no attributes, the differences in comparison with the other tags are not visible, which is why the question of possible reasons for its use.

How and where to use?

The HTML

tag is an introductory for somesection of the document. It is not mandatory to use and is usually written at the top of the page section. From English "tag" is translated as "header", but in Russian slang the word "cap" is more often used. Usually this tag is used at the top of the page, where the name and logo of the site is located, as well as an auxiliary menu. However, you can often find its use in the headings of sections.

html header

In HTML

, like a number of other tags, appearedonly in the 5th version of the markup language. Therefore, not all browsers correctly process it. The language specification assumes that the tag contains the section header (h1-h6) or pages, as well as auxiliary elements necessary in the "header" of the site, including banners, a contact data block, and others. Like most HTML tags,
must have its "closing pair" - , which indicates the end of the properties of this tag. Wanting to customize the header of the site for your personal design type, you can use a number of attributes for the tag that define its style.

Examples of using

The practice of working with the tag will fully understandprinciples of work

. HTML-examples of its use can be found on almost every major site. On them, it is usually used to designate a header.

header html examples

One way to specify the "header" of a site using the

tag is as follows:

HTML5

In addition to the title, you can also add anydesired elements and tags, except for

. It is responsible for the page footer and can not be present in the "header" of the site. If this element is found inside the header tag, the site will not load correctly.