What is a header in HTML
HTML article, section, header, footer, nav
Distribution and structure: Sectioning
For the visitor, the structure of the HTML page emerges clearly through the graphic layout, but for screen readers, speech output and the search engines there is only a flood of div tags without any information about the structure of the page.
article, section and nav map the structure of a website into hierarchical chapters similar to the table of contents of a non-fiction book.
Stand for the semantics of the HTML page header, Main and footer to disposal.
< article >
Content that could stand on its own - e.g. a post in a blog - can be packed in article tags.
a self-contained composition in a document, page, application, or site and that is intended to be independently distributable or reusable
article tells the search engines where the actual content of the document begins while header, nav and footer provide the framework for the content.
< section >
A good guide to where HTML5 section and where to use a div tag is to summarize the content of the web page: If content in a list has its own item, a section tag is a better choice than a div tag.
Or even simpler: If you can put a heading over it, as the validator wishes, then an area can be set in a section tag.
Different to article is section an area that could not necessarily stand alone. The standard has the border between article and section only delicately identified on the “self-contained”: That explains why we keep getting stuck with these two terms. Theoretically, article tags can be placed inside section tags. This structure is also recognized as correct by the validator.
<HTML header >
HTML5 header is intended to introduce the content and will usually contain the typical header elements such as headings, time and author. header and section go hand in hand, so to speak.
< nav >
The nav tag is reserved for links to other pages and to areas within the same page. The nav element should only be used for the main navigation of the page and not for casual links on a page.
< footer >
HTML5 footer records what the name suggests: the information in the footer of an article or post and the information in the footer of the page. Just like header, footer can also be used in every section object.
In addition to important links such as imprint and data protection, which are often repeated in the footer, the footer element is a good place for the address element with the contact information about the author or publisher of the document.
< main >
The main tag represents the main content of the page or application and should only be used once within a page or application. Many websites use a wrapper
In this sense, may Main cannot be set within tags such as section, header, footer, aside, nav or article. Content that is repeated on many pages, such as logos, search fields and navigation links, should not sit within the main element.
More on HTML main
The address tag is an old HTML tag, but has changed its meaning with HTML5 and is also counted among the sectioning elements with HTML5.
Examples for article and section
The structure of section, header and article looks puffed up at first. They are ideal for the table of contents of eBooks. For example, the table of contents of an eBook on photography could look like this:Photography from practice to the basics ........ 1 The camera The structure of the camera ....................... 15 SLR cameras ... ..................... 29 System cameras without mirrors .................. 35 Basics of exposure time and aperture ... ................ 67 PSAM The Creative Programs .................. 82 How to assert yourself against your camera Exposure corrections. .................... 104 Manual focus ....................... 127
article, aside, section, nav and h1… h6 form the beginning of a new section. The first heading in each paragraph is the heading of a section. For example, the overview page of a blog can be structured as follows:<body> <header> <h1>Video in Webseiten</h1> </header> <article> <h2>Dateiformate für Video</h2> <section> <h3>MP4-Video</h3> <p> Teaser </p> </section> <section> <h3>OGG-Video</h3> <p> Teaser </p> </section> </article> <article> <h2>Video-Codecs</h2> <section> <h3>H.264</h3> <p> Teaser </p> </section> <section> <h3>Theora OGG</h3> <p> Teaser </p> </section> </article> </body>
section tags don't have to be inside article sitting - it would work just as well the other way round. The validator recognizes both structures as correct. Can just as well article in article be nested. As mentioned earlier, the difference between article and section only basically consists of the "self-containing" for article.
Even if more than one heading h1 should be allowed: The validator warns that tools such as screen readers cannot yet cope with this.
- Why do people think dying is everything
- How can we keep the relationship going?
- Good grades are really important
- If 3 8x 1 what is x
- Which instrument should I play?
- How often do you look up
- Is racism openly acceptable in some countries
- Can you eat gallium
- Which are the best diversified mutual funds
- When did someone deserve to be loved?
- Does my psychotherapist care too much?
- Where can I find hospitality marketing lists
- How do I achieve greatness
- How do I pronounce denial
- What is the Truecaller app
- How do sorbets and ice cream differ
- What is a list of american wars
- Hynix RAM is best suited for gaming
- How can I exchange my crypto currency
- What are the advantages of cell phones
- How am I supposed to avoid procrastination?
- Will the future be about quantum communication?
- Why did Marco Rubio's campaign fail?
- How can I understand electrical circuit diagrams