Design comparison
Community feedback
- @Islandstone89Posted 10 months ago
Good job! Here are a few suggestions.
HTML:
-
The illustration image is decorative, meaning the alt text should be empty:
alt=""
. -
Don't use words like "photo" in the alt text, screen readers will recognize it as an image. I would also include the name of the person, something like: "Headshot of Gary Hooper".
CSS:
-
It's good practice to include a CSS Reset at the top.
-
Change the
height
onbody
tomin-height
- this way, the content will not get cut off if it grows beneath the viewport. -
Remove the percentage width on the card. Add a
max-width
in rem, to prevent it from getting too wide on larger screens. -
Use
px
instead of%
forborder-radius
. -
font-size
must never be in px. This is bad for accessibility, as it prevents the font size from scaling with the user's default setting in the browser. Use rem instead. -
As the design doesn't change, there is no need for any media queries. When you do need them, they should be in rem, not px.
Marked as helpful1 -
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