aside inside the header

0
Hello, I would like to know if it is semantic to use the <aside></aside> tag inside the head in a menu that is fixed in the header of the page next to the logo of the site, in my conclusion I think it is wrong because the tag <header> is a tag that indicates a section of the page, in the case the top, but it would be wrong to just insert the <nav> direct menu in <header> .

    
asked by anonymous 31.03.2018 / 07:10

2 answers

1

If the tag in question is the <header ... /> , it would be semantic since the proposed structure is something like the example of w3c itself. link

<article>

  <header>
    <h1>Flexbox: The definitive guide</h1>

    <aside>

      <header>
        <h2>About the author: Wes McSilly</h2>
        <p><a href="./wes-mcsilly/">Contact him! (Why would you?)</a></p>
      </header>

      <p>Expert in nothing but Flexbox. Talented circus sideshow.</p>
    </aside>

  </header>

  <p><ins>The guide about Flexbox was supposed to be here, but it
    turned out Wes wasn’t a Flexbox expert either.</ins></p>

</article>

You can also read the documentation that gives you more information about using these and other tags in: link

    
31.03.2018 / 14:32
0

Official description

This page of W3C describes the header element as follows:

  

The header element represents introductory content for its nearest   ancestor main element or sectioning content or sectioning root   element. A header typically contains a group of introductory or   navigational aids.

Translating:

  

The header element represents introductory content for your   nearest ancestor or content section or   of the root element. A header typically contains a group   of introductory or navigational aids.

So your statement is not exactly correct:

  

... is a tag that indicates a section of the page, in the case the top ...

This is because, in a semantic way, the element is used to present introductory content, but not just to make a section from the top.

Mother, who is my father?

The MDN speech that the <aside> tag can have any element parent who accepts flow content .

  

Any element that accepts stream content. Note that an element    <aside> should not be descended from a <address> element.

In addition, the W3C page (example 20) that was said, with the following code:

<article>
  <header>
    <h1>Flexbox: The definitive guide</h1>
    <aside>
      <header>
        <h2>About the author: Wes McSilly</h2>
        <p><a href="./wes-mcsilly/">Contact him! (Why would you?)</a></p>
      </header>
      <p>Expert in nothing but Flexbox. Talented circus sideshow.</p>
    </aside>
  </header>
  <p><ins>The guide about Flexbox was supposed to be here, but it
    turned out Wes wasn’t a Flexbox expert either.</ins></p>
</article>

Conclusion

Given this, and adding, I usually think that <aside> comes from an English sentence: aside from content (apart from content).

So it's clear that it can be used "next to" content, no matter if it's a paragraph or header.

    
01.04.2018 / 02:30