In this section we will inform you about the <header> tag in html5. The <header> tag is used for defining the document or section introduction. The <header> tag usually contains <h1>-<h6> and <hgroup> tags. The <header> tag can contains logo or slogan of the site or company because it is placed at topmost area of the web page. The <header> tag must have both oppening and closing tags.
The syntax for declaring the <header> tag is:
| <header>Header Content</header> |
Example:header_tag.html.
| <!DOCTYPE html> <html> <head> <title>Example of header Tag</title> </head> <body> <b>This is example of header tag.</b><br> <header> <span style="color:blue;font-style:italic;"> Gyan Singh: HTML5 </span> </header><hr> </body> </html> |
Output:
Difference between HTML5 and HTML4
This is the new introduction in html5.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.