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 submission

Cyclone3603โ€ข 90

@Cyclone3603

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


Hey there! This is my first project on HTML and CSS after a LOOOOOONG time of not coding at all. This was a nice, simple site to help me get into the swing of things, and I feel like I really needed that.

Please let me know about any improvements I can make in the comments!

Community feedback

@MelvinAguilar

Posted

Hello there ๐Ÿ‘‹. Good job on completing the challenge !

I have some suggestions about your code that might interest you.

HTML ๐Ÿ“„:

  • Use the <main> tag to wrap all the main content of the page instead of the <div> tag. With this semantic element you can improve the accessibility of your page.
  • Always avoid skipping heading levels; Always start from <h1>, followed by <h2>, and so on up to <h6> (<h1>,<h2>,...,<h6>).

CSS ๐ŸŽจ:

  • Instead of using pixels in font-size, use relative units like em or rem. The font-size in absolute units like pixels does not scale with the user's browser settings. You can read more about this here ๐Ÿ“˜.
  • Use min-height: 100vh instead of height: 100vh. The height property will not work if the content of the page grows beyond the height of the viewport.

I hope you find it useful! ๐Ÿ˜„ Above all, the solution you submitted is great!

Happy coding!

Marked as helpful

0

Cyclone3603โ€ข 90

@Cyclone3603

Posted

@MelvinAguilar I named the file qrcode.html because I want all my projects to be in one giant website. https://cyclone3603.github.io is the main website with links to all the rest of them, that's why the naming is off.

I didn't know that something like a <main> tag existed. Will remember for next time, I'll edit the code. I'll also remember the the heading levels for next time.

How do I make the text break and go to the next line within the same <h1> tag without using a <br> tag?

I'll remember the units for next time, do these help with responsiveness too?

Thanks for all of your inputs! I'll be sure to include all of them in my next project!

0

@MelvinAguilar

Posted

@Cyclone3603 Hi

  • That is valid, but it is a standard to set the name of the main file as "index.html", I share this repository with many challenges where in each one the file is called as index.html, you will see that there is no problem in using that name:

https://github.com/elaineleung/frontendmentor

When using many index.html what matters is the folder, not the name of the file, plus it has fewer letters.

before: https://cyclone3603.github.io/product-preview-card-component-main/productreview.html

after: https://cyclone3603.github.io/product-preview-card-component-main/

  • Testing with your solution, currently if I remove the <br> tag I don't see a difference but if it has problems I personally set a maximum width and try to center it with margin, e.g. (Random values):
p {
    max-width: 15ch;
    margin: 0 auto; /* If you don't use flexbox in the component, to center it use margin auto. */
}

Marked as helpful

0
Cyclone3603โ€ข 90

@Cyclone3603

Posted

@MelvinAguilar Ohhh, it's only the folder that matters? So I can just link the folder instead of the HTML?

max-width seems like an interesting property. I'll have to play around with it. Thanks for letting me know!

0
Anslyโ€ข 230

@Median21

Posted

Hello there! You did a good job following the designs and completing the challenge ๐Ÿ˜€

Here are the problems I would like to address:

- Don't start your code by putting it in a <div> even though it is still acceptable, since this challenge only requires one content, it is still a good practice to use semantic elements like <header>, <main>, and many more. So that it is easier to be seen in search engines and makes it more specific.

- The <br> tag is not a semantic element. If a screen reader user is reading the page, they will hear "line break", which breaks the flow of the content. Instead, use CSS properties like margin and padding to add vertical space between elements. (I got this tip from a feedback, so I also wanted it to share to you)

Overall, you did a very good job! Knowing that you just came back from coding ๐Ÿ’ช

1

Cyclone3603โ€ข 90

@Cyclone3603

Posted

@Median21 Thanks for the support!

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