@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:
- 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:
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>- SEO Optimization: Meta description: Add a meta description for better SEO:
- CSS Organization: Duplicate font preconnect links: You have repeated preconnect links for Google Fonts. You only need them once, consider removing the duplicates:
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">- 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:
- 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:
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.
- 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.