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

My 1st Attempt ~ Creating a QR code component using flexbox

@bijiyiqi2017

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


How to make this semantic html?

What areas needs improved, and how?

How to do box shadows right as well as understand it well?

Is there anything that I should study to make my second attempt an improved attempt?

Any additional constructive feedback is welcomed. Thank you.

Community feedback

Daniel 🛸 44,240

@danielmrz-dev

Posted

Hello William!

Your solution looks great!

I have a couple of suggestions for improvement:

  • In order to make your HTML code more semantic, and since that is the main title of the screen, you can replace the <h2> with <h1>. Unlike what most people think, it's not just about the size and weight of the text.

The <h1> to <h6> tags are used to define HTML headings. <h1> defines the most important heading. <h6> defines the least important heading. Only use one <h1> per page - this should represent the main heading/subject for the whole page. Also, do not skip heading levels - start with <h1>, then use <h2>, and so on.

  • Also, still about semantic HTML, you can replace your div#qr-container with main.#qr-container.

All these tag changes may have little or no visual impact but they make your HTML code more semantic and improve SEO optimization as well as the accessibility of your project.

I hope it helps!

Other than that, great job!

Marked as helpful

0
Vanza Setia 27,795

@vanzasetia

Posted

Hi, William! 👋

Congratulations on finishing your first challenge! 👏

Regarding the HTML, I recommend swapping <div id="qr-container"> with <main> tag. Remember that all HTML pages require to have one <main> tag. The reason is because that tag represents the main content of the page. It will be weird if there is no content on that page.

There are more technical reasons to use that element. You can learn more about web accessibility on The A11Y Project.

Also, I recommend using class attribute instead of id. id is used for anchoring or connecting the <label> element to the right <input> element. It is not recommended to use it for a hook in the stylesheet due to high specificity. Learn more: What the ID attribute is REALLY for

I hope this helps. Happy coding! 👍

Marked as helpful

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