I have been using HTML for ages, but had never looked too deep into the new HTML5 elements and HTML structuring/sectioning. I have done some reading on MDN and w3s, but am still quite confused. Below is an image of the layout, the document structure of the body section, and some question that I have.
<body>
<header id='header'>
<h1 id='header-left'>
<img id='logo' />
</h1>
<div id='header-right'>
<nav id='nav-links-cont'>
<a class='nav-links' href='' alt=''>FILTER</a>
<a class='nav-links' href='' alt=''>SELL</a>
<a class='nav-links' href='' alt=''>FEEDBACK</a>
</nav>
</div>
</header>
<main id='content'>
<div id='content-left'>
<aside id='search-and-filter-pane'></aside>
<article id='product-info-pane'></article>
<aside id='transaction-pane'></aside>
</div>
<section id='content-right'>
<article class='grid-item'>
<h4 class='row item-transaction'></h4>
<div class='row item-image'></div>
<h1 class='row item-product'></h1>
<h2 class='row item-brand'></h2>
<h3 class='row item-model'></h3>
</article>
<article class='grid-item'>
<div class='row item-transaction'></div>
<div class='row item-image'></div>
<div class='row item-product'></div>
<div class='row item-brand'></div>
<div class='row item-model'></div>
</article>
</section>
</main>
</body>
Should
content-left
andcontent-right
instead besection
elements or evenh3
andh4
elements rather thandiv
elements? Or shouldcontent-left
andcontent-right
beaside
andsection
elements respectively?Is it okay to use
h1
thruh4
elements in an unordered fashion like in thecontent-right
article:first-child
element?I know you're supposed to avoid using more than one
h1
tag, but read somewhere on MDN that it is acceptable in different sections? So is it okay to reuseh1
thruh4
inarticle
elements?Is my use of
aside
elements incontent-left
correct? Should thecontent-left
aside
elements besection
elements instead?
`. The `#content-right/left` could be `` or `
– zer00ne Mar 16 '19 at 06:30` obvs created a new section, but the following `
` would create a new section on the same level?
following a
– Robert Siemer Mar 17 '19 at 16:18will create a subsection. If you want another section on the same level, in this case, use
again. – So far so logic, I’ld say.