CodePark/ questions / Semantic HTML
START PRACTICINGPRACTICE
Frontend question · CSS & HTML › Semantic HTML

A blog feed shows a list of post previews. Each preview has a title, excerpt and author, and would make sense on its own if syndicated in an RSS reader. Which element should wrap each preview?

article

article is right. It is for self-contained content that makes sense on its own, such as a post, a comment or a product card. Each preview here could be shown alone in an RSS reader, so it is an article.

section is the tempting wrong answer. It groups one thematic part of a document. It usually has a heading, but it is not meant to stand alone. div is wrong because it carries no meaning at all, so use it only as a hook for styling. aside is for content that is only loosely related to the main content, like a sidebar.