@Islandstone89
Posted
Excellent advice, Kamran!
I'll add the following:
HTML:
- The alt text should be written naturally, without using
-
between the words. Write something short and descriptive, without including words like "image" or "photo". Screen readers start announcing images with "image", so an alt text of "image of qr code" would be read like this: "image, image of qr code". The alt text must also say where it leads(the frontendmentor website). A good alt text would be "QR code leading to the Frontend Mentor website."
CSS:
-
I recommend adding a bit of
padding
, for example16px
, on thebody
, to ensure the card doesn't touch the edges on small screens. -
Remove the margin on the card.
-
As mentioned above, setting fixed sizes is not ideal, so remove all widths and heights. Add a
max-width
of around20rem
on the card. -
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. -
In addition to
max-width: 100%
, I also like to setheight: auto
anddisplay: block
on all images. Removemargin-top
. -
To create the space between the image and the edge of the card, set
padding
on all 4 sides of the card:padding: 16px;
.
Marked as helpful