3 card component responsive using HTML and CSS only
Design comparison
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello again ๐. Congratulations on completing the challenge! You should be proud of your hard work
I have some feedback for you if you want to improve your code.
HTML ๐:
- You should use only one
<h1>
tag per page. The<h1>
tag is the most important heading tag, This can confuse screen reader users and search engines. This challenge requires thatSedans
,SUVs
andLuxury
are headings, but you can use the<h2>
tag instead of the<h1>
tag. You can read more about this here ๐.
- You should use the
<a>
tag instead of the<button>
tag because theLearn More
button is a link to another page. Use buttons to perform actions like submitting a form or closing a modal and use links to navigate to another page. You can read more about this here ๐.
-
Not all images should have alt text. Car icons are for decoration purposes only, so they can be hidden from screen-readers by adding
aria-hidden="true"
and leaving its alt attribute empty:<img src="./images/icon-sedans.svg" alt aria-hidden="true"> <img src="./images/icon-suvs.svg" alt aria-hidden="true" > <img src="./images/icon-luxury.svg" alt aria-hidden="true" >
I hope you find it useful! ๐
Happy coding!
Marked as helpful1@RabberpoliPosted almost 2 years agoHi Melvin! Thanks again for giving me useful tips. Especially for the button I didnโt spend so much attention and I got distracted by the UI, next time Iโll be more focused and precise, I swear ๐
Thanks and happy coding! ๐
0 - You should use only one
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