Design comparison
Solution retrospective
Are there any potential improvements in my code structure? What best practices should I consider for a more efficient implementation? Any recommendations for enhancing the overall user experience? Are there alternative approaches or advanced techniques I could explore? Any advice on this subject is welcome 😁
Community feedback
- @Islandstone89Posted 10 months ago
Hi Mamadou. Here is my feedback, I hope it helps :)
HTML:
-
Move the CSS for the
.attribution
to the CSS file, where it belongs. -
It is common to use classes instead of IDs.
-
The image has meaning, so it must have proper alt text. Write something short and descriptive, without including words like "image" or "photo". Screen readers start announcing images with "image", so an alt text of "image of Jessica Randall" would be read like this: "image, image of Jessica Randall".
-
Replace the
<span>
elements with<p>
. -
The social links are links, not buttons. So, wrap them in an
<a>
tag.
CSS:
-
It's good practice to include a CSS Reset at the top.
-
font-size
must never be in px. This is bad for accessibility, as it prevents the font size from scaling with the user's default setting in the browser. Use rem instead. -
Paragraphs have a default value of
font-weight: 400
, so there is no need to declare it. -
Don't use complex selectors like
#about-part div:nth-child(2)
- it is hard to read, and it increases specificity. Instead, add a class on the<div>
and target that.
Marked as helpful0@404diabyPosted 10 months agoHello @Islandstone89 !! . Thanks you for comment, your advice. It helped me a lot. I will try to apply it in future projects
1 -
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