Design comparison
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hi there ๐. Good job on completing the challenge ! I have some feedback for you if you want to improve your code.
HTML:
- Use the
<main>
tag to wrap all the main content of the page instead of the<div>
tag. With this semantic element you can improve the accessibility of your page.
- Use the
<footer>
tag to wrap the footer of the page instead of the<div class="attribution">
. The<footer>
element contains information about the author of the page, the copyright, and other legal information.
- You must use a level-one heading (h1) even though this is not a full-page challenge. You can create an '<h1>' element within your 'main' element that will be hidden visually but visible and readable by screen readers. The class "sr-only" hides content visually and here are the styles to copy. e.g.:
<h1 class="sr-only">QR Card Component</h1>
- The
alt
attribute should explain the purpose of the image. Uppon scanning the QR code, the user will be redirected to the frontendmentor.io website, so a betteralt
attribute would beQR code to frontendmentor.io
- The
alt
attribute should not contain the words "image", "photo", or "picture", because the image tag already conveys that information.
If you want to learn more about the
alt
attribute, you can read this article.CSS:
- Setting the font-size to 62.5% can attract compatibility issues with third-party libraries or plugins. You can read more about this with this two lectures:
Credit to grace-snow and vanzasetia for pointing this out.
I hope you find it useful! ๐ Above all, the solution you submitted is great!
Happy coding and Happy New Year! ๐๐๐
Marked as helpful1 - Use the
- @catherineisonlinePosted almost 2 years ago
HI! Your solution looks nice though there are a couple of things you can improve which I hope will be helpful! ๐
If you want to improve your code, make sure to use <footer> tag instead of <div> tag, the one where the class is โattributionโ. There are a lot of other important semantic HTML tags which you can read about here or anywhere else: https://www.w3schools.com/html/html5_semantic_elements.asp
Make sure to wrap the entire code in the main tag instead of using the div, the one where the class is โcardโ. It will help to remove report issues and improve accessibility as well. If you are using, for example, header or footer tags, you can place them outside the main tag.
Marked as helpful0
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