Design comparison
Community feedback
- @Islandstone89Posted 9 months ago
HTML:
-
Every webpage needs a
<main>
that wraps all of the content, except for<header>
andfooter>
. This is vital for accessibility, as it helps screen readers identify the "main" section of a page. Change.main
to a<main>
. -
There should only be one
<h1>
on a page. Given there are 3 similar headings, I would change all of them into a<h2>
.
CSS:
-
It's good practice to include a CSS Reset at the top.
-
Add around
1rem
ofpadding
on thebody
, so the card container doesn't touch the edges on small screens. -
Remove
font-optical-sizing
andfont-style
. -
On
body
and.main
, changeheight
tomin-height
. -
Remove the fixed width on the card container. Instead, add a
max-width
in rem. -
font-size
must never be in px. This is a big accessibility issue, as it prevents the font size from scaling with the user's default setting in the browser. Use rem instead. -
It is common to do mobile styles as the default and use media queries (in rem) for larger screens.
Marked as helpful0 -
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