Design comparison
Community feedback
- @3eze3Posted over 1 year ago
Hi Emil Abbasov very good project for this challenge.
Here are some suggestions to improve the HTML and CSS code:
HTML:
-
Use semantic HTML tags instead of generic div tags. For example, use header instead of div for the main header.
-
Use descriptive class names that reflect the content and function of the elements they apply to. For example, instead of using "img" for a container div, use something like "hero-image" or "illustration".
-
Use relative units for sizing elements instead of absolute units. For example, use percentages, ems or rems instead of pixels for font sizes and widths.
-
Add labels to the buttons to make their purpose clear to screen readers and users who navigate the web with the keyboard.
CSS:
-
Use more descriptive class names to make it easier to understand the purpose of each element.
-
Avoid using absolute units like pixels for sizing elements, as this can lead to layout issues on different screen sizes and resolutions.
-
Use CSS variables to define color values and other style properties that are reused throughout the code, to make it easier to maintain and update the styles.
-
Add comments to the code to make it easier to understand and navigate.
-
Use more specific CSS selectors instead of relying on inheritance and the * selector, which can lead to unintended side effects.
-
Use media queries to make the layout more responsive to different screen sizes and device types.
Overall, the code is fairly simple and easy to read, but using more semantic HTML and descriptive CSS classes could make it even clearer and easier to maintain.
Happy coding ❤
Marked as helpful0 -
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