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 com flexbox

Beth Melo 10

@Bethzila

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


What are you most proud of, and what would you do differently next time?

Me orgulho de ter concluído o desafio e da próxima vez tentaria fazer o desafio usando o Grid Layout.

What challenges did you encounter, and how did you overcome them?

Enfrentei a utilização do flexbox, procurei vídeos e exemplos para concluir o desafio.

What specific areas of your project would you like help with?

Gostaria de ajuda com responsividade. Abrir o site em dispositivos diferentes e que ele ficasse da mesma maneira.

Community feedback

@Aggressive-Mohammed

Posted

Hello Beth Melo!

Congratulations on completing the challenge. You did awesome! Your HTML structure is well-organized and demonstrates a solid understanding of semantic elements. However, here are some recommendations and comments in terms of web development best practices:

  1. Accessibility: Alt text for images: The alt attribute for the QR code image could be more descriptive. It currently just says “qr code,” but it would be more helpful to describe what scanning the code will do. Consider:
<img src="images/image-qr-code.png" alt="QR code linking to Frontend Mentor website">

Use of headings: The <h1> is appropriately used, but you could consider adding a <p> tag instead of a <span> for the description. This will make the text more semantically correct as a paragraph, which is generally more appropriate for larger blocks of text.

<p class="descricao">Scan the QR code to visit Frontend Mentor and take your coding skills to the next level.</p>
  1. SEO Optimization: Meta description: Add a meta description for better SEO:
<meta name="description" content="Improve your front-end skills by building projects. Scan the QR code to visit Frontend Mentor and level up your coding skills."> Title optimization: The title could be more descriptive to improve search engine discoverability: <title>QR Code Component - Frontend Mentor Project</title>
  1. CSS Organization: Duplicate font preconnect links: You have repeated preconnect links for Google Fonts. You only need them once, consider removing the duplicates:
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

CSS Optimization: You have two separate font links for different weights of the same font (Outfit). You can combine them into a single request to improve performance:

<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;700&display=swap" rel="stylesheet">
  1. Semantic HTML: Main content structure: You have structured the content well inside a <main> tag. Ensure the layout is semantically correct: Use <section> for grouping related content, like your QR code and description. Add a container <div> or <section> around the QR code and the text to make it more organized:
<section class="qr-container"> <img src="images/image-qr-code.png" alt="QR code linking to Frontend Mentor website"> <h1>Improve your front-end skills by building projects</h1> <p class="descricao">Scan the QR code to visit Frontend Mentor and take your coding skills to the next level.</p> </section>
  1. Performance: Image optimization: Ensure that the image of the QR code is optimized for web use. You could further compress it or use a more modern image format like WebP for faster loading times. Lazy loading images: Add the loading="lazy" attribute to the QR code image to improve page performance:
<img src="images/image-qr-code.png" alt="QR code linking to Frontend Mentor website" loading="lazy"> 6. Footer Links: Security for external links: Since the links in the footer open in a new tab (target="_blank"), include rel="noopener noreferrer" for security:

Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank" rel="noopener noreferrer">Frontend Mentor</a>. Fixing the author link: Currently, the "Coded by" link has no href. You should add a valid link to your GitHub or portfolio, or make it clearer if it’s a placeholder:

Coded by <a href="https://github.com/Bethzila" target="_blank" rel="noopener noreferrer">Bethzila</a>. 7. General Cleanup: Whitespace and indentation: Your HTML code is well-indented, making it easy to read. Ensure this practice continues as your project scales.

  1. Considerations for Maintainability: If you plan on adding more components to this project, consider organizing the CSS into modules or adopting a naming convention like BEM (Block Element Modifier) to make class names more descriptive and reusable across your project. By addressing these points, your QR Code Component will be more accessible, performant, and maintainable.
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