Design comparison
Solution retrospective
Was a fun challenge.
The hero section for the mobile and tablet section is made up of one image, in the desktop version 1 picture should be replaced into 2 pictures, so there was a challenge of adding additional images to the HTML markup so that they would not show up ( you can use display:none;
for that ) and then replace them with a media query at the appropriate screen size.
The fun part is that when I had 1 image and when I had 2 images, they were part of the same CS Grid, they just got switched.
Any input is appreciated.
Community feedback
- @petritnurediniPosted 10 months ago
Congratulations on completing the Frontend Mentor challenge! Your project shows a great understanding of HTML, CSS, and responsive design. Here are a few suggestions for improvement:
-
CSS Best Practices:
- Avoid overusing
!important
in your CSS. This can make it harder to maintain and override styles later. Instead, use specific class names or CSS specificity to apply styles. - Consider using Sass or another CSS preprocessor for better organization and maintainability of your stylesheets. This can help with nesting, variables, and mixins for more efficient styling.
- Avoid overusing
-
HTML Structure and Accessibility:
- Ensure that your HTML is semantically correct. For example, use
<nav>
for navigation links and<header>
,<main>
, and<footer>
tags to define page sections. - Enhance accessibility by adding
alt
text to all your images. This is crucial for screen readers and users who might have images disabled.
- Ensure that your HTML is semantically correct. For example, use
-
Responsive Images:
- Use the
srcset
attribute in your<img>
tags for responsive images. This allows the browser to choose the most appropriate image size based on the screen size, improving performance on different devices.
- Use the
Additional Resources:
- MDN Web Docs for HTML, CSS, and JavaScript best practices.
- Sass Basics for an introduction to CSS pre-processors.
- Web Accessibility Initiative (WAI) for guidelines on making web content more accessible.
Keep up the excellent work, and continue to challenge yourself with more complex projects. Each step is a valuable learning opportunity. 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