@Islandstone89
Posted
HTML:
-
<main>
has an implicitrole="main"
, so there is no need to declare it explicitly. -
The alt text must also say where it leads(frontendmentor website).
-
.attribution
should be a<footer>
, and you should use<p>
for the text inside. It needs to be moved outside of the footer, as they are 2 separate landmarks.
CSS:
-
Including a CSS Reset at the top is good practice.
-
Add around
1rem
ofpadding
on thebody
, so the card doesn't touch the edges on small screens. -
Add
gap: 2rem
onbody
, to create space between the card and the footer. -
I would use
px
forborder-radius
instead of%
. -
Remove all widths in
px
. -
Add a
max-width
of around20rem
on the card, to prevent it from getting too wide on larger screens. -
Since all of the text should be centered, you only need to set
text-align: center
on the body, and remove it elsewhere. The children will inherit the value. -
Paragraphs have a default value of
font-weight: 400
, so there is no need to declare it. -
On the image, change
width
tomax-width
. -
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 helpful
@Alexandru736
Posted
@Islandstone89 Thank you so much for the feedback. May I ask why most distances(width, max-width) should be represented in rem
units instead of px? I am new to CSS and I don't quite understand yet when and where should use some units. If the answer would be too long to write, I would kindly appreciate if you would provide some useful articles to read.
@Islandstone89
Posted
@Alexandru736 This article explains some of the downsides regarding px
.