Basic of HTML - Cafe Menu Linked Sort Of

Hi there, I was just on Step 52 of the Cafe HTML course and i’ve completed it fine but i’m wondering what’s the need to put things into separate articles? Is it just for easier to read / organise or is there a more in depth purpose behind it? I’ve left an example of how i had to do it for the course

   <article class="item">
            <p class="dessert">Donut</p><p class="price">1.50</p>
          </article>

          <article class="item">
            <p class="dessert">Cherry Pie</p><p class="price">2.75</p>
          </article>

          <article class="item">
             <p class="dessert">Cheesecake</p><p class="price">3.00</p>
          </article>

          <article class="item">
            <p class="dessert">Cinnamon Roll</p><p class="price">2.50</p>
          </article>

Whereas why couldn’t you have

<article class="item">
            <p class="dessert">Donut</p><p class="price">1.50</p>
            <p class="dessert">Cherry Pie</p><p class="price">2.75</p>
             <p class="dessert">Cheesecake</p><p class="price">3.00</p>
            <p class="dessert">Cinnamon Roll</p><p class="price">2.50</p>
          </article>

It’s probably a bit of overkill. Using divs here would be just fine. Really, it doesn’t make that much of a difference. Although, I believe the JAWS screen reader might announce articles a little differently so it could possibly be a little verbose for people using JAWS. If I were to code this from scratch I would not use articles for each menu item.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.