Design comparison
Solution retrospective
-
Is my implementation of css is good?
-
Any place where i can reduce the CSS?
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there 👋. Good job on completing the challenge !
I have other suggestions about your code that might interest you.
HTML 📄:
- Use semantic elements such as
<main>
and<footer>
to improve accessibility and organization of your page.
Alt text 📷:
- The
alt
attribute should not contain underscores or hyphens, it must be human readable and understandable.
- The
alt
attribute should not contain the words "image", "photo", or "picture", because the image tag already conveys that information.
-
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
If you want to learn more about the
alt
attribute, you can read this article. 📘.
I hope you find it useful! 😄 Above all, the solution you submitted is great!
Happy coding!
Marked as helpful1@Mr-jawPosted almost 2 years ago@MelvinAguilar Thanks for the review ❤️
yup, i was lacking in accessibility. i'll improve that in future. also yh, the alt text i'll keep that in mind too
1 - Use semantic elements such as
- @HassiaiPosted almost 2 years ago
Replace<div class="qr-card">with the main tag,<p class="title"> with <h1> and <div class="attribution"> with the footer tag to fix the accessibility issues. click here for more on web-accessibility and semantic html
Give the img a max-width of 100% instead of a width.
Give h1 and p the same font-size of 15px and the same margin-left, margin-right and margin-top values. Give p a margin bottom value. don't give h1 a font weight value.
Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful1@Mr-jawPosted almost 2 years ago@Hassiai Thanks for the review ❤️
yh i should have used <h1> instead of <p>. my bad. and yh relative units. i'm consider it when i do my next project.
0@HassiaiPosted almost 2 years ago@Mr-jaw for an accessible content the html must have <h1>
Marked as helpful1 - @sandro21-glitchPosted almost 2 years ago
Hi Muhammadh👋
Your implementation of CSS is good and adheres to best practices such as using CSS variables for reusable styles, setting box-sizing for better control over element dimensions, and using flexible units (vh) for minimum height.
There's no need to reduce the CSS as it's concise and only includes necessary styles. However, you may want to consider adding media queries to make your design responsive to different screen sizes.
Good Luck
Marked as helpful1@Mr-jawPosted almost 2 years ago@sandro21-glitch Thanks for the review ❤️
Yh, i thought of adding media queries since the mobile and the desktop view looked the same i didn't go for it. but yh thanks for pointing that out 🙂
1
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