Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 3 months ago

Responsive QR Code using HTML & CSS

P
Kyle Mulqueen•400
@kmulqueen
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


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

What I'm Most Proud Of

I'm particularly proud of two aspects of this project:

  1. Visual Implementation: My ability to accurately translate the Figma design into a polished final product with clean, efficient CSS that required minimal troubleshooting.

  2. 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 Challenges

The 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:

  1. Researched semantic HTML best practices through MDN documentation
  2. Learned about the appropriate use of <article>, <figure>, and <header> elements
  3. Refactored my code to implement proper semantic structure
Design Precision Challenges

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:

  1. Using the browser inspector tools to compare my implementation with the design
  2. Making incremental adjustments to CSS properties
  3. 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 Principles

I'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
Stylesheet Readability

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
HTML Optimization

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
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • jrdnbrg•50
    @jrdnbrg
    Posted 3 months ago

    Hi! I have to give you feedback, but I honestly do not have any. Your HTML and CSS look really good and well structured.

  • Nishant Goyal•40
    @ngcoder7
    Posted 3 months ago

    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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub