How to define header for a document or section using HTML ? Last Updated : 26 Nov, 2020 Comments Improve Suggest changes Like Article Like Report The <header> tag in HTML is used to define the header for a document or a section. It contains information related to the title and heading of the related content. The <header> element is intended to usually contain the section’s heading (an h1-h6 element or an <hgroup> element), but this is not required. The <header> element can also be used to wrap a section’s table of contents, a search form, or any relevant logos. The <header> tag is a new tag in HTML5 and it requires a starting tag as well as an end tag. There can be several <header> elements in one document. A <header> tag cannot be placed within a <footer>, <address> or another <header> element. Syntax: <header> Contents... </header> Example: HTML <!DOCTYPE html> <html> <head> <title> How to define a header for a document or section using HTML? </title> <style> h1 { color: green; } body { text-align: center; } </style> </head> <body> <header> <h1>GeeksforGeeks</h1> <h2> How to define a header for a document or section using HTML? </h2> <p> <a href="https://www.geeksforgeeks.org/fundamentals-of-algorithms/"> Algo</a> | <a href="https://www.geeksforgeeks.org/data-structures/"> DS</a> | <a href="https://www.geeksforgeeks.org/category/program-output/"> Languages</a> | <a href="https://www.geeksforgeeks.org/company-interview-corner/"> Interview</a> | <a href="https://www.geeksforgeeks.org/student-corner/"> Students</a> | <a href="https://www.geeksforgeeks.org/gate-cs-notes-gq/"> Gate</a> | <a href="https://www.geeksforgeeks.org/articles-on-computer-science-subjects-gq/"> CS Subjects</a> | <a href="https://www.geeksforgeeks.org/quiz-corner-gq/"> Quizzes</a> </p> </header> </body> </html> Output: Comment More infoAdvertise with us Next Article How to define header for a document or section using HTML ? V vkash8574 Follow Improve Article Tags : Web Technologies HTML CSS CSS-Misc HTML-Misc +1 More Similar Reads How to add footer for a document or section using HTML5 ? In this article, we define a footer for a document or section by using the <footer> tag. This tag in HTML is used to define a footer of HTML document. This section contains the footer information (author information, copyright information, carriers, etc). The <footer> tag is used within 1 min read How to define a title for a document using HTML5 ? In this article, we will define a title for the document by using the <title> tag. This tag in HTML is used to define the title of the HTML document. It sets the title in the browser toolbar. It provides the title for the web page when it is added to favorites. It displays the title for the pa 1 min read How to define information about the document using HTML ? The <head> tag in HTML is used to define the head portion of the document which contains metadata related to the document. This tag can contain other head elements such as <title>, <meta>, <link>, <style>, <link> etc. The <head> element was mandatory In HTML 1 min read How to define a section in a document in HTML5 ? In this article, we will discuss how to define a section in a document in html5. We can create a section in the document using the Section tag. HTML <section> Tag: Section tags divide content into section and subsection. The section tag is used when there is a requirement for two header, foote 1 min read Which tag is used to define the header for HTML document ? The <header> tag in HTML is used to define the header for a document. It contains information related to the title and heading of the related content. The <header> element is intended to usually contain the sectionâs heading (an h1-h6 element or an <hgroup> element), but this is no 2 min read Like