Design comparison
Community feedback
- @Islandstone89Posted 10 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.container
into a<main>
. -
The alt text should be written naturally, so don't use
-
between words. Also, the alt text in this challenge needs to say where it leads (frontendmentor.io).
CSS:
-
It is best practice to write CSS in a separate file, often called
style.css
. Create one in the same folder as theindex.html
, and link to it in the<head>
:<link rel="stylesheet" href="style.css">
. -
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. -
Add some
padding
, around1rem
on thebody
, so the card doesn't touch the edges on small screens. -
Remove the
margin
on the card. Instead, addjustify-content: center
on thebody
. -
max-width: 360px
must be in rem instead ofpx
. Around20rem
works fine. -
On the image, add
display: block
and changewidth
tomax-width: 100%
- the max-width prevents it from overflowing its container.
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