@Dudeldups
Posted
Heya 👋
Your html looks good except for the huge indentation. You should use 2 spaces or maybe 4 or else it will look weird when you have to do further nesting.
Some general advice I can give you:
- Do not declare font-sizes with
px
, userem
or rarelyem
instead
https://joshcollinsworth.com/blog/never-use-px-for-font-size
- Do not use id-selectors
#qr-code
in your CSS. They have a higher specificity and you could end up overwriting a style that you didn't intend to. Keep it all to classnames.class
or element selectors.
When looking at such a small component, it's hard to talk about the semantic HTML part. Generally, you would have a header
on a site with a nav
inside, then in the main
content somewhere you'd find this component wrapped inside a div like yours. So just like the h1
you used here is normally not correct, because the h1 is the main title/heading of a site. This component would probably have an h3 or something, depending on the structure of the website (headings should be used in descending order).
But to be honest, this is nothing to worry about in this small challenge, great work and keep those solutions coming 🤠