Submitted about 1 year ago
QR code component for Front-End Mentor (first challenge)
@ascarfone2
Design comparison
SolutionDesign
Solution retrospective
For this project, I put the image in the HTML using
Option 1
<div class="qr-code"> <img class="qr-image" src="images/image-qr-code.png" alt="QR Code" /> </div>and then styling in CSS with .qr-image, rather than using an empty div like:
Option 2
<div class="qr-image" role="img" aria-label="QR Code"> </div>and then linking to and styling the image in CSS.
What should I consider when deciding which method to use?
I used an h1 element for the top text and a p element for the bottom text. Was h1 the best chosen element to use or would they both have been better off as p elements?
Community feedback
- @LeoBozicPosted about 1 year ago
I would go with first option using img tag :)
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