Design comparison
Community feedback
- @denieldenPosted about 2 years ago
Hi Msiesse, congratulations on completing the challenge, great job! π
Some little tips for optimizing your code:
- add
main
tag and wrap the card for improve the Accessibility - also you can use
article
tag instead of a simplediv
to the container card for improve the Accessibility - remove
title
attribute fromimg
- use
min-height: 100vh
tobox
class instead ofheight
, otherwise the content is cut off when the browser height is less than the content - instead of using
px
use relative units of measurement likerem
-> read here
Hope this help! Happy coding π
1@msiessePosted about 2 years ago@denielden Thank you ! Why removing
title
from img attribute ?1@denieldenPosted about 2 years ago@msiesse You are welcome and keep it up :)
Because The
title
attribute contains text representing advisory information related to the element it belongs to.So it is similar to the
alt
of theimg
element and could make accessibility confusing1@msiessePosted about 2 years ago@denielden Ok thanks, Iβve put a title just to see a basic bubble when we hover qr code. Even if in this project it doesnβt really matter
1 - add
- @correlucasPosted about 2 years ago
πΎHi @msiesse, congratulations for your first solution!π Welcome to the Frontend Mentor Coding Community!
Great solution and great start! By what I saw youβre on the right track. Iβve few suggestions to you that you can consider to add to your code:
1.Use
<main>
instead of<div>
to wrap the card container. This way you show that this is the main block of content and also replace the div with a semantic tag.2.Something I've noticed in your code is that in many occasions you've added some
<div>
to wrap contents that don't really need to be inside of a div block. Note that for this challenge all you need is a single block to hold all the content, can be<div>
or<main>
if you want to use a semantic tag to wrap the content, the cleanest structure for this challenge is made by a block of content with div/main and all the content inside of it (img, h1 and p) without need of any other div or something. See the structure below:<body> <main> <img src="./images/image-qr-code.png" alt="Qr Code Image" > <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.Use units as
rem
orem
instead ofpx
to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but to all sizes as well.βοΈ I hope this helps you and happy coding!
1
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