In HTML5 es ist nur definiert, dass aside
ist "verwandt mit dem Inhalt rund um die aside
Element ".
In HTML 5.1 (CR) die Definition became more specific, wie es jetzt sagt, dass aside
"um den Inhalt der Kindererziehung Inhalt sectioning" ist.
Nach der neueren Definition sollte das Element aside
innerhalb des Abschnitts Element sein, auf das es bezogen ist. Das main
Element ist nicht ein Schnittelement (Elemente wie article
, section
, body
, figure
etc. sind). Sie können natürlich immer noch aside
in main
platzieren, aber es wird mit dem nächstliegenden Trennelementelternteil von main
in Verbindung gebracht.
Das bedeutet, dass es keinen semantischer Unterschied ist (für aside
) in diesen beiden Beispielen:
<body>
<main></main>
<aside><!-- related to the body --></aside>
</body>
<body>
<main><aside><!-- related to the body --></aside></main>
</body>
Beispiel, dass ein paar verschiedenen Fälle zeigt:
<body>
<main>
<article>
<aside><!-- related to the article --></aside>
<section>
<aside><!-- related to the section --></aside>
<blockquote>
<aside><!-- related to the blockquote (not to the section!) --></aside>
</blockquote>
<div>
<aside><!-- related to the section (not to the div!) --></aside>
</div>
</section>
</article>
<aside><!-- related to the body (not to the main!) --></aside>
</main>
<aside>
<!-- related to the body -->
<aside><!-- related to the (parent) aside --></aside>
</aside>
<nav>
<aside><!-- related to the nav --></aside>
</nav>
<footer>
<aside><!-- related to the body (not to the footer!) --></aside>
</footer>
</body>
Bitte beachten Sie, dass fordern " SEO-Auswirkungen "ist bei Stack Overflow nicht möglich. Solche Fragen können auf [webmasters.se] gestellt werden. – unor
Danke @unor! Ich werde dies für zukünftige Fragen in Erinnerung behalten. –