Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

qr-code-component-main

Sagar Boyalβ€’ 20

@sagarboyal

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Great Learning

Community feedback

@MelvinAguilar

Posted

Hi @sagarboyal πŸ‘‹, good job completing this challenge! πŸŽ‰

I like this solution for the challenge. I have some suggestions you might consider to improve your code:

  • Use the <main> tag to wrap all the main content in your solution instead of using <div class="container">.
  • Use <footer> instead of <div class="attribution">. The <footer> element contains authorship information.
  • In this challenge, the picture tag is not needed, since the image does not need to change depending on the viewport. This is necessary with the "Product preview card component" solution because the platform provides two images, one for mobile and one for desktop. You can directly use the image tag in this solution.
  • The <article> tag specifies independent content. The content of the article tag makes sense on its own and you can put that same article on a separate page and still make sense. You can use <div> instead.
  • The alternative text must not contain hyphens, underscores, or the words "image" or "photo", it must be human readable.
  • To make alternative texts more worthwhile, add descriptive text to the alt attribute of the QR image to explain what the QR image does. Upon scanning the QR code, you will be redirected to the frontendmentor.io website, so an example of alternative text would be "QR code to frontendmentor.io". You can read more about alternative text here.

Above all, the project is done wellπŸ‘. I hope those tips will help you! πŸ‘

Good job, and happy coding! 😁

Marked as helpful

1

Sagar Boyalβ€’ 20

@sagarboyal

Posted

@MelvinAguilar ohoo!! I get it thank you πŸ˜ŠπŸ’•

1
Lucas πŸ‘Ύβ€’ 104,440

@correlucas

Posted

πŸ‘ΎHi , congratulations on your solution!πŸ‘‹ Welcome to the Frontend Mentor Coding Community!

Great solution and a great start! From what I saw you’re on the right track. I’ve few suggestions for you that you can consider adding to your code:

Your HTML code is not optimized yet, since it's too long and has some unnecessary elements. To make it clean you start by removing some unnecessary <div>. For this solution you wrap everything inside a single block of content using <div> or <main> (better option for accessibility) and put inside the whole content <img> / <h1> and <p>.

<body>
<main>
<img src="./images/image-qr-code.png" alt="QR Code Frontend Mentor" >
 <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>

Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR

✌️ I hope this helps you and happy coding!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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