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 challenge using html and css

Fengβ€’ 280

@Feng-09

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


I wasn't able to center attribute horizontally. I'd appreciate a tip on how to do that next time and also any advice or corrections if there's anything else wrong with my code. Thank you

Update: I removed some unnecessary code, replaced the unnecessary divs with semantic tags and centered it horizontally thanks to the helpful comments

Community feedback

@MelvinAguilar

Posted

Hi @Feng-09 πŸ‘‹, good job completing this challenge, and welcome to the Frontend Mentor Community! πŸŽ‰

I like this solution for the challenge. Here are a few suggestions I've made that you can consider in the future if you're looking to improve the solution further:

Regarding your question:

  • Use align-items: center to the body to center the card horizontally.

Here are some other suggestions:

With semantic tags:

<body>
   <main class="flex">
      . . .
   </main>
   <footer class="attribution">
      . . .
   </footer>
<body>
  • Add an h1 tag to your solution. The <h1> element is the main heading on a web page. There should only be one <h1> tag per page, and always avoid skipping heading levels; Always start from <h1>, followed by <h2>, and so on up to <h6> (<h1>,<h2>,...,<h6>). The HTML Section Heading elements (Reference)

Solution:

<h1 class="bold">Improve your front-end skills by building projects</h1>
  • Instead of using pixels in font size, use relative units of measure like rem or em. The font size in absolute length units (px) does not allow users with limited vision to change the text size in some browsers. Reference.
  • There is no need to have this media query:
@media screen and (min-width: 376px)
 div.flex {
    width: 315px;
    padding: 18px;
    margin: 5% auto;
 }

 img {
    margin-bottom: 10px;
 }
}

I hope those tips will help you.

Good job, and happy coding!

Marked as helpful

2

Fengβ€’ 280

@Feng-09

Posted

@MelvinAguilar I understand. Thank you so much for the tips, they're really helpful

1
Adrianoβ€’ 34,090

@AdrianoEscarabote

Posted

Hi Feng, how are you?

Welcome to the front-end mentor community!

I really liked the result of your project, but I have some tips that I think you will enjoy:

  • every Html document must contain the main tag, so we can identify the main content, to fix this, wrap all the content with the main tag. HTML5 landmark elements are used to improve navigation experience on your site for users of assistive technology.

The rest is great!

I hope it helps... πŸ‘

Marked as helpful

1

Fengβ€’ 280

@Feng-09

Posted

@AdrianoEscarabote Thanks for the tip. I'll take note of this

1
Adrianoβ€’ 34,090

@AdrianoEscarabote

Posted

@Feng-09 happy coding!!

1

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