
Design comparison
Solution retrospective
I am seeking feedback on the overall quality of my code, with a specific focus on how it can be improved to ensure cleaner, more maintainable, and efficient implementation. Additionally, I am looking for suggestions to optimize the code for Search Engine Optimization (SEO), including strategies for improving performance, accessibility, and semantic structure. I welcome recommendations on best practices, refactoring opportunities, and techniques to enhance both functionality and readability.
Community feedback
- @damigandPosted 4 months ago
I would say the code looks pretty good. The project looks a little smaller than the challenge, but that's okay. I don't think I can talk about the actual code, but I can give you some word of advice for SEO and accessibility.
First of all, make sure to have at least one
main
element in your HTML. It tells things like screenreaders or other accessibility tools where the content of your page is. Elements likemain
,footer
orheader
are called semantic elements and they're very important for people who need screenreaders or other tools to properly view your page, you can read more about them here.Secondly, consider using
img
elements for... well, images. Properties likebackground-image
are very helpful when it comes to adding images to your page and making them responsible, but keep in mind that some accessibility tools won't be able to recognize it. To get the same responsiveness on yourimg
tags, I would suggest looking into theobject-fit
property, it's very helpful and it also applies tovideo
elements. Here's a link if you're interested.And last but not least, it is considered good practice to always prevent using uppercase letters in the
id
attributes of your elements. This is mainly because theid
attribute is case sensitive and can lead to confusion when too manyid
attributes are used. You can read more about good practices ofid
names here.If my comment was helpful, please mark it as such, happy coding!
Marked as helpful0@Aditic1Posted 4 months ago@damigand Thank you for all the pointers! I will keep them in mind for the upcoming projects.
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