@Islandstone89
Posted
Hi, you did a good job. Here is some feedback.
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 a page's "main" section. Wrap the card in a<main>
. -
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(frontendmentor website).
CSS:
-
Including a CSS Reset at the top is good practice.
-
I like to add
1rem
ofpadding
on thebody
, to ensure the card doesn't touch the edges on small screens. -
Remove the
position
andtransform
properties, they should not be used for a layout like this. -
To center the card horizontally and vertically, use Flexbox on the body:
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100svh;
-
The card is a
<div>
, which is a block element. Block elements take up the full width by default, so there is no need forwidth: 100%
. -
max-width
must be in rem - 20rem
is the size I usually recommend for this project. -
Paragraphs have a default value of
font-weight: 400
, so there is no need to declare it. -
On the image, add
display: block
and changewidth
tomax-width: 100%
- the max-width prevents it from overflowing its container.
Marked as helpful
@surajsharma19
Posted
Thank you for the feedback @Islandstone89. I will surely follow the things you have mention. I didn't use flexbox because I wanted to make this without Flexbox or Grid.
hope you are doing well and have a nice day.