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

fem-qr-code

@Jahan-Shah

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

@MelvinAguilar

Posted

Hi there πŸ‘‹. Good job on completing the challenge ! I have some feedback for you if you want to improve your code.

HTML:

  • Use the <main> tag to wrap all the main content of the page instead of the <div> tag. With this semantic element you can improve the accessibility of your page.
  • Use the <footer> tag to wrap the footer of the page instead of the <div class="attribution">. The <footer> element contains information about the author of the page, the copyright, and other legal information.
  • You must use a level-one heading (h1) even though this is not a full-page challenge. You can create an '<h1>' element within your 'main' element that will be hidden visually but visible and readable by screen readers. The class "sr-only" hides content visually and here are the styles to copy. e.g.: <h1 class="sr-only">QR Card Component</h1>
  • The alt attribute should explain the purpose of the image. Uppon scanning the QR code, the user will be redirected to the frontendmentor.io website, so a better alt attribute would be QR code to frontendmentor.io
  • The alt attribute should not contain the words "image", "photo", or "picture", because the image tag already conveys that information.

If you want to learn more about the alt attribute, you can read this article.

CSS:

  • Instead of using pixels in font-size, use relative units like em or rem. The font-size in absolute units like pixels does not scale with the user's browser settings. This can cause accessibility issues for users who have set their browser to use a larger font size. You can read more about this here.

I hope you find it useful! πŸ˜„ Above all, the solution you submitted is great!

Happy coding! πŸŽ„

Marked as helpful

1

@Jahan-Shah

Posted

@MelvinAguilar Hi, Thanks for your constructive feedback on my solution I really appreciate that. I'll apply the changes soon and will also implement those things in future.

Although I wanted to ask that, the font size they mentioned was 15px for paragraph. I could have used the 1rem, or should I use the precise size for it? like calculate the value or 15px in rems.

1

@MelvinAguilar

Posted

@Jahan-Shah Hi!, Convert their units to rem. 16px is usually 1rem. If the paragraph should be 15px, you would convert it to 0.938rem

If you want to avoid doing calculations, you can install an extension in Visual Studio Code that will automate the process. Search for a "px to rem" extension or use this website: https://nekocalc.com/es/px-a-rem-conversor

Marked as helpful

1

@Jahan-Shah

Posted

@MelvinAguilar Thanks for helping me out.

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