QR code component with HTML5 & CSS3

Solution retrospective
This is my first solution, i hope you guys like it.
if you have any tip please share with me!
Please log in to post a comment
Log in with GitHubCommunity feedback
- @MelvinAguilar
Hello there 👋. Good job on completing the challenge !
I have some other suggestions about your code that might interest you.
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. 📘.
CSS 🎨:
- You should use the
box-sizing: border-box
property to make thewidth
andheight
properties include the padding and border of the element. This will make it easier to calculate the size of an element. You can read more about this here 📘.
-
You should use a CSS reset to remove the default browser styles and make your page look the same in all browsers.
Popular CSS resets:
I hope you find it useful! 😄 Above all, the solution you submitted is great!
Happy coding!
Marked as helpful - The
- @KeganF
Nice job completing your first challenge!
One thing I would suggest is to add some more semantic HTML by wrapping the contents of the card (
img
,h1
, andp
tags) in something like anarticle
tag.This reference talks about semantic HTML elements and says that an article "should make sense on its own, and it should be possible to distribute it independently from the rest of the web site."
Not only will an article element act as a container to group together all the elements of your card, it will also help make it reusable in other places!
Cheers! 😀
Marked as helpful
Join 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