Home >>HTML5 Tutorial >html5 header tag

html5 header tag

HTML5 <header> Tag

The header tag in HTML is a new tag in HTML5 and is used to define the header for a document.

It requires a starting tag as well as end tag. It contains information related to the heading and title of the content. You can use several <header> elements in one tag. By using <header> tag you can wrap section’s table of contents, a search form and any relevant logos but you cannot placed a <header> tag within a <footer>, <address> or another <header> element.

Let's take an example of HTML <header> tag:

Ex(i)

<!DOCTYPE> <html> <body> <header> <h2>This is a heading </h2> <p>This a paragraph</p> </header> </body> </html>
Output:

This is a heading

This a paragraph

Let's take another example:

Ex(ii)

<!DOCTYPE html> <html> <head> <title>Header_Tag</title> </head> <body> <header> <h1>phptpoint</h1> <p> <a href= "https://www.phptpoint.com/mysql-tutorial/"> MYSQL</a> | <a href= "https://www.phptpoint.com/codeigniter-tutorial/"> CODEIGNITER</a> | <a href= "https://www.phptpoint.com/laravel-tutorial/"> LARAVEL</a> | <a href= "https://www.phptpoint.com/wordpress-tutorial/"> WORDPRESS</a> | <a href= "https://www.phptpoint.com/seo-tutorial/"> SEO</a> | <a href= "https://www.phptpoint.com/how-to-prepare-for-a-job-interview/"> INTERVIEW</a> | </p> </header> </body> </html>
Output:

phptpoint

MYSQL | CODEIGNITER | LARAVEL | WORDPRESS | SEO | INTERVIEW |


No Sidebar ads