Answer the question
In order to leave comments, you need to log in
Generic use of section and article, would such a structure be correct for an online store?
Kind everyone.
I have a question about the versatility of using markup for an online store.
In fact, I want to finally decide here finally, since all stores are essentially the same in structure and no longer ask questions and doubts.
Main page, block latest products we make the structure:
<section>
<h2>Последние товары</h2>
<section>
<section>
<h2>Последние товары</h2>
<div class="list">
</div>
<section>
<section>
<h2>Последние товары</h2>
<div class="list">
<article class="list__item"> - // - </article>
<article class="list__item"> - // - </article>
<article class="list__item"> - // - </article>
<article class="list__item"> - // - </article>
</div>
<section>
Answer the question
In order to leave comments, you need to log in
Is the structure in the card so big that a section is needed?
What do you want to achieve by adding all these wrappers around all the elements inside the card (I'm talking about header around the header for example)?
Headings are best done in a hierarchy, as they will help navigate the page.
Regarding section -> article, I agree, it looks like the truth in terms of semantics. But inside the card, there will most likely not be a complex structure to highlight entire sections, and do not forget that the section must have a heading.
like so
<section>
<h1>Последние товары</h1>
<article>
<aside>
<figure>
<figcaption>Описание изображения</figcaption>
<img src="" alt="" />
</figure>
</aside>
<header>
<h2>Товар</h2>
</header>
<div>
Краткое описание товара
</div>
<footer>
<div>Цена</div>
<button>Кнопка купить</button>
</footer>
</article>
</section>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question