Design comparison
Community feedback
- @itswebcoderPosted 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! 😊
I would also add some transitions for active states (when colors change on hover). It creates more interactivity and makes the project look cooler. Active states can be done on buttons, links, titles which act like links, or anything else, you choose.
You can read more about it here, in case you haven’t done much of it: https://www.w3schools.com/css/css3_transitions.asp
The image with the alt "car-icon" should be used more as a decorative image, rather than being attached to any content. Also, you wrote alt only on two images and the third one is empty.
Alt attribute for the image is important in order to specify alternative text for the image in case it will not be displayed. Using alt attribute is good for not only accessibility but also SEO and for situations when the image is loading too slowly. If the image is just for decoration you can still write an alt attribute but leave it empty, such images don’t need any alt tag but you will need to also add aria-hidden=“true”. What aria-hidden does is that it removes the entire element from the accessibility tree.
If otherwise, you need to use an alt tag to describe the image. To write an alt tag you need to describe the content and purpose of the image and try not to use words like “picture of” or “image of”.
Finally, for the images to match width you can also do:
.icon { width: 30%; height: 80%; }
Marked as helpful0 - @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! 😊
I would also add some transitions for active states (when colors change on hover). It creates more interactivity and makes the project look cooler. Active states can be done on buttons, links, titles which act like links, or anything else, you choose.
You can read more about it here, in case you haven’t done much of it: https://www.w3schools.com/css/css3_transitions.asp
The image with the alt "car-icon" should be used more as a decorative image, rather than being attached to any content. Also, you wrote alt only on two images and the third one is empty.
Alt attribute for the image is important in order to specify alternative text for the image in case it will not be displayed. Using alt attribute is good for not only accessibility but also SEO and for situations when the image is loading too slowly. If the image is just for decoration you can still write an alt attribute but leave it empty, such images don’t need any alt tag but you will need to also add aria-hidden=“true”. What aria-hidden does is that it removes the entire element from the accessibility tree.
If otherwise, you need to use an alt tag to describe the image. To write an alt tag you need to describe the content and purpose of the image and try not to use words like “picture of” or “image of”.
Finally, for the images to match width you can also do:
.icon { width: 30%; height: 80%; }
But also better to set some specific width and height instead of percentage.
0
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