Responsive QR Code using HTML & CSS

Solution retrospective
What I'm Most Proud Of
I'm particularly proud of two aspects of this project:
-
Visual Implementation: My ability to accurately translate the Figma design into a polished final product with clean, efficient CSS that required minimal troubleshooting.
-
Semantic Structure: How I evolved my approach to semantic HTML during the project—moving from basic structure to a properly organized document with appropriate
<article>
,<figure>
, and<header>
elements.
This dual focus on both visual fidelity and semantic correctness represents a more holistic approach to front-end development that I'll carry forward.
What I'd Do Differently
If I were to approach this project again, I would start with the proper semantic structure from the beginning, rather than refactoring it later. Having a solid foundation of semantic HTML before adding styles would likely make the development process even more efficient and result in cleaner code from the outset.
What challenges did you encounter, and how did you overcome them?Challenges and Solutions
Semantic HTML ChallengesThe primary challenge I faced was correctly implementing semantic HTML. Initially, I misused <section>
tags within the QR card component, which didn't accurately represent the content structure. This created potential accessibility issues and didn't follow best practices.
To overcome this challenge, I:
- Researched semantic HTML best practices through MDN documentation
- Learned about the appropriate use of
<article>
,<figure>
, and<header>
elements - Refactored my code to implement proper semantic structure
Another challenge was ensuring the final result precisely matched the Figma design specifications, particularly with:
- Getting the right box-shadow on the QR card
- Achieving proper spacing between elements
I overcame these by:
- Using the browser inspector tools to compare my implementation with the design
- Making incremental adjustments to CSS properties
- Focusing on pixel-perfect implementation of the design specifications
This methodical approach to both the HTML structure and visual styling resulted in a solution that not only looks correct but is also built on a solid foundation of semantic markup.
What specific areas of your project would you like help with?Areas Where I'd Like Feedback
CSS Organization and DRY PrinciplesI'm seeking guidance on striking the right balance with my CSS classes. I want to:
- Keep my code DRY (Don't Repeat Yourself) through thoughtful class creation
- Avoid overdoing utility classes which might lead to "div soup" with too many classes
- Establish a maintainable pattern for styling components
I'd appreciate feedback on whether my CSS stylesheet is:
- Organized in a logical, intuitive way for other developers
- Structured to make it clear where new styles should be added
- Commented appropriately to explain complex or non-obvious styling decisions
- Following naming conventions that make the purpose of styles clear
While I've improved my semantic HTML structure, I'd still like to know:
- If there are additional accessibility enhancements I could implement
- Whether there are SEO opportunities I'm missing in my markup
- Whether the document structure could be further optimized for screen readers
Please log in to post a comment
Log in with GitHubCommunity feedback
- @jrdnbrg
Hi! I have to give you feedback, but I honestly do not have any. Your HTML and CSS look really good and well structured.
- @ngcoder7
Its Good but i didnot think that we need semantic element in this as there is no need to do do that in this small project.
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