@correlucas
Posted
Hello Little-Koder! Congratulations for your first challenge solution, well done!
I've looked your live site and you replicated really good the qr code card elements! I've some tips that you can consider applying to your solution, in case you're interest I'll let a list:
1.To keep simple the challenge I would say you to try to use the attribution tag only when you'll have a concrete knowledge of centering elements. This can make a little bit harder your first challenge.
2.You can wrap all the content inside the <main> that's semantically fine, no need for the extra element <article>
and <figure>
in this case. The structure can be only <body><main><img><h1></h1><p></p></main></body>. I wrote the structure here, fixing your html
<body cz-shortcut-listen="true"> <main class="card"><img src="/img/image-qr-code.png" alt="The qr code image" class="qr-img"><h1>Improve your front-end skills by building projects</h1><p>Scan the QR code to visit Frontend Mentor and take your coding skills to the next level</p></main></body>
3.No need to add <br> to the paragraphy, the line will break automatically when your set the card max-width.
4.Classes, you don't need many classes in this challenge since you've only one h1
, img
and p
. Work their properties in the CSS just using an img {} for example.
5.Consider using flex
instead of position: relative;
to align the card center. Info about flexbox here: ://www.w3schools.com/css/css3_flexbox.asp
6.You can separate the elements using padding-top, for example a padding-top: 12px;
in the h1 and p.
I hope it helps you bro, keep coding!
Marked as helpful
@vanzasetia
Posted
@correlucas
Hey there! I would like to add some more suggestions.
For the alternative text of the QR code,
- There's no need for the word "image". The
img
itself is already enough to make the screenreader pronounce it as an image. - You can give more additional information about the QR code. In this case, the QR code will redirect the users to https://www.frontendmentor.io/. So, the alternative text for the QR code should be "QR code to frontendmentor.io". By doing this, it will allow the users to know what the image is (QR code) and what the QR code is about (redirecting the users to the Frontend Mentor website).
Marked as helpful
@Little-Koder
Posted
@correlucas I don't know why I didn't use an h1! I am still getting used to card layouts so these tips are very much appreciated. I will also look at the w3schools guide on Flexbox.
I have a hard time with text wrapping and things like that so I will look into max-width, min-width, etc.
Thanks for the classes tip as well. Keep coding as well!