I hope this is helpful
- Use the picture element for serving responsive images not hiding/showing different ones with css. The picture element is far more performant, only downloading the relevant image for the users screen size, not both of them like with the css method.
- Decorative images must have empty alt. There's a good post in the resources channel on discord about how and when to write alt text.
- The section element is not appropriate here. All of this content should be within a
main
landmark. - This is currently completely inaccessible because of your html (and js). It needs more than just buttons. Read my tutorial. It is essential to consider your html carefully.
- It's better for performance to link fonts in the html head instead of css imports.
- Always use a modern css reset at the start of the styles in every project. Look up Andy Bell's one and get into the habit of using a full one.
- Don't style on IDs. That's not what they are for and it increases css specificity drastically (never a good thing)
- The component max width should be in rem not px.
- Use flex or grid properties to center a component in the viewport not position absolute. Personally I wouod use css grid for this whole page layout.
- Do not use floats! You will almost never need them in modern development. The only time may be in prose content like a blog if you want text to flow around images.
- Mobile styles should be the default.
- Do not write media queries like this. They must be defined in rem or em not px. And if working desktop first you will only need max-width not a max and min width in combination. When working mobile first you will only need a min width media query. See fedmentor.dev/posts/responsive-meaning
Marked as helpful
@Priyanshu-WD
Posted
Hey, @grace-snow, thank you so much, I get to know a lot. As a self-taught developer, it's really helpful for me.