10 Jul HTML5 header Tag
Use the HTML5 header tag to add header on the web page or document. Header is an area at the top of a web page or document.
Add introductory content, logo, and with that also add heading elements <h1> to <h6> under the <header> tag.
Here, we will see an example to add header to a web page or document,
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<!DOCTYPE html> <html> <head> <title>Understanding header tag</title> </head> <body> <header> <h1>Studyopedia sections</h1> <h2>Programming</h2> <h2>Databases</h2> <h2>Content Management Systems (CMS)</h2> </header> </body> <html> |
Here’ the output,
We have added the sections information under the HTML5 header tag. It includes the top level heading <h1> with “Studyopedia sections” and other information with <h2> heading such as “Programming”, “Databases”, etc.
We also added a title to the web page “Understanding header tag”, which would be visible on the page’s tab as well as web browsers tab.
No Comments