Design comparison
Community feedback
- @grace-snowPosted 9 months ago
Here's some pointers
- Use a
main
landmark - It's better for performance to link fonts in the html head instead of css imports
- Don't add extra divs for no reason. This is one card. You don't need a div around the image, or the heading and paragraphs. Keep the html as simple as possible
- You're misusing section in this. Ideally it should be an unordered list with a list item wrapping each link. It's definitely not a section though, that would need a heading.
- IDs are not for styling. They shouldn't be used for css or js selectors, it's not what they're for. There's a detailed post on FEDmentor.dev if you want to read more
- Get into the habit of using a full modern css reset at the start of the styles in every project.
- The max width in this should be in rem not px so that it works for all users including those of us who need larger font sizes
- The img should have an explicit width and height
- Never ever write font size in px, not even once. This is essential.
- Learn the difference between padding and margin. Elements like headings and paragraphs are not boxes and have no concept of needing "internal" space. Again, read more on FEDmentor.dev
0 - Use a
- @hassanmoaaPosted 9 months ago
Hello @AsmaMxhd!
Great Job solving the challenge mate *congrats * š
Some suggestions for improvements.
For the font-size it's is better to use rems and ems but px for this project is no big deal.
font-size: 13px;
-
i see you using pixels for many elements, never use pixels for font-sizes in any element, here's why:
-
Certain font-related CSS properties will render your site completely inaccessible if their value is declared using pixels even once.
Which properties are affected?
All of these properties must never ever be declared in pixels:
- font-size
- line-height
- letter-spacing
If you've used pixels to define any of the above style properties, these will not respect the user's font size preferences!
- You should use ems, and rems for font-sizes would be better
This article may help:
https://fedmentor.dev/posts/font-size-px/
āāāāāāāā
Use <main> to wrap the main content instead of <div>. * š Tags like <div> and <span> are typical examples of non-semantic HTML elements. They serve only as content holders but give no indication as to what type of content they contain or what role that content plays on the page. This tag change does not impact your project visually and makes your HTML code more semantic, improving SEO optimization as well as the accessibility of your project.
āāāāāāā
Other than that you're good, keep up the good work!
0@AsmaMxhdPosted 9 months agoHello @hassanmoaa!
Thank you for the valuable feedback! I'll keep this in mind for my future projects and avoid using pixels. I'll also make use of <main> tag instead of just <div> elements! I really appreciate your inputs. Thank you!
0@grace-snowPosted 9 months ago@hassanmoaa px for font size is always a big deal!! Instant serious accessibility failure
1@grace-snowPosted 9 months ago@AsmaMxhd refactor this solution. Don't take feedback forward for "future". Improve the ones you've got first
0 -
Please log in to post a comment
Log in with GitHubJoin 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