HTML (Hypertext Markup Language) is a markup language used to create web pages. It consists of various tags that define the structure and content of a web page. One such tag is the header tag, which is used to define the header section of a web page.
The header section of a web page typically contains the logo, navigation menu, and other important information about the website. The header tag is used to define this section and is placed at the top of the web page.
The header tag is an HTML5 tag that is used to define the header section of a web page. It is a container tag that can contain other HTML tags such as the h1, h2, h3, p, and img tags.
The header tag is used to provide important information about the website such as the logo, navigation menu, and contact information. It is also used to improve the accessibility of the website by providing a clear and concise description of the website's purpose.
Example 1: Basic Header Tag
The following code shows a basic example of the header tag:
```
```
In this example, the header tag contains the h1 tag, which defines the title of the website, and the nav tag, which contains the navigation menu.
Example 2: Header Tag with Image
The following code shows an example of the header tag with an image:
```
```
In this example, the header tag contains an img tag, which displays the website's logo, and the nav tag, which contains the navigation menu.
Example 3: Header Tag with Background Image
The following code shows an example of the header tag with a background image:
```
```
In this example, the header tag has a background image set using the style attribute. The h1 tag defines the title of the website, and the nav tag contains the navigation menu.