Assessment for structuring a page of content skill test

Hello, :raised_hand_with_fingers_splayed:

Iโ€™ve done for skill test: Structuring a page of content.
here my code on Glitch:

page-content-structuring

I changed the image path based on glitch assets. :raised_hands:

I have a question, what should I use <article> or <section>?

Thanks :upside_down_face:

Hi @rinaldo

Great job on this exercise. Everything is correct. :tada:
Not wrong, butI would change the formatting of the <a> and <img>:

<!-- before -->
<a href="image.jpg"
  ><img
    src="image-th.jpg"
    alt="description"
/></a>

<!-- after -->
<a href="image.jpg">
  <img
    src="image-th.jpg"
    alt="description"
  >
</a>

For me that looks cleaner, but itโ€™s just a matter of taste. Your version is also correct. :blush:

In this exercise it makes sense to use <article> like you did, because itโ€™s a self-contained text describing the content of the web site.
In general you can ask yourself this question: โ€œWould it still make sense when I take this text as a whole and put it somewhere else?โ€ If the answer is yes then you should use an <article>. <section> is more generic. An <article> can contain a several chapter with their own headings and we would use <section> for these chapters. A good example for <article> is a blog post. You could take it and put it somewhere else (Website, news feed, print it out) and it would still make sense.
Also see the usage notes about <section>

Have a nice weekend,
Michael

2 Likes