Design comparison
Solution retrospective
Is there anything I can do to improve my HTML? Wasn't sure about using the section element over article or div tags.
Community feedback
- @SatellitePeacePosted about 2 years ago
Hello Jenna you did an excellent job
-As for your question, is the answer is, no there is nothing you have to do to improve your HTML code as far as this particular project is concerned
-Although section tags and article tags are slightly different they are usually used interchangeably and it is also acceptable to wrap your sections tag in an article tag and vice versa
-However just as you did in your QR code project, always ensure that your section tag or the article tag always contains a heading tag (between h1 - h6 )
-Finally, where possible, it is best to avoid using the div tag because semantically it has no meaning. -However, if you must use the div tag attach an aria-role to it
-e.g
role="banner" I hope this helps
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord