@vivekbhatt07
Posted
Thank you for the suggestion it was very helpful. Learnt new things and will remember to apply them.
@vivekbhatt07
Posted
Thank you for the suggestion it was very helpful. Learnt new things and will remember to apply them.
@MelvinAguilar
Posted
Hi there ๐. Good job on completing the challenge !
I have some feedback for you if you want to improve your code.
HTML:
<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 that Sedans
, SUVs
and Luxury
are headings, but you can use the <h2>
tag instead of the <h1>
tag. You can read more about this here.<a>
tag instead of the <button>
tag because the Learn 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.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" >
CSS:
Instead of using pixels in font-size, use relative units like em
or rem
. The font-size in absolute units like pixels does not scale with the user's browser settings. This can cause accessibility issues for users who have set their browser to use a larger font size. You can read more about this here.
position: absolute
would make your element behave strangely on some screen sizes, "there's a chance the content will grow to overflow the parent". You can use Flexbox or Grid to center your element. You can read more about centering in CSS here.I hope you find it useful! ๐ Above all, the solution you submitted is great!
Happy coding! ๐
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