
Design comparison
Solution retrospective
I am most proud of successfully integrating Bootstrap and custom styles to create a responsive and visually appealing landing page. The use of Bootstrap icons and a custom navbar was particularly satisfying. Next time, I would focus more on optimizing the performance of the page by minimizing CSS and JavaScript files and ensuring all images are properly compressed.
What challenges did you encounter, and how did you overcome them?One of the main challenges was ensuring the navbar was fully responsive and worked well on all devices. I overcame this by thoroughly testing the navbar on various screen sizes and using Bootstrap's built-in classes to handle responsiveness. In addition, I had to solve some issues with element alignment, which I solved by customizing the CSS and using Bootstrap's grid system and customizing the background in the first section was also a challenge as I had to use different svg imgs that were used at different sizes.
What specific areas of your project would you like help with?I would like help with improving the accessibility of the landing page. While I have made some efforts to ensure it is accessible, I am not confident that I have covered all aspects. Any advice on best practices for accessibility, particularly for navigation and interactive elements, would be greatly appreciated. Additionally, feedback on optimizing the loading speed of the page would be helpful.
Community feedback
- P@huyphan2210Posted 3 months ago
Hi, @hanifanwary
I saw your questions and wanted to share my thoughts:
1. Improving Accessibility with Semantic HTML
One way to enhance accessibility is by making your HTML as semantic as possible. Replace unnecessary
div
elements with more meaningful HTML tags to create cleaner and more readable code.For example, your navbar currently uses this structure:
<div> <nav> <div> <!-- Navbar content --> </div> </nav> </div>
This setup is redundant. Instead, simplify it like this:
<nav> <!-- Navbar content --> </nav>
This approach is cleaner, more understandable, and more semantic. Similarly, replace other
div
elements with appropriate tags based on their purpose.2. Optimizing Images for Better Performance
Images significantly impact page loading speeds, so it's essential to optimize their use.
Lazy Loading: Ensure all images are lazy-loaded to improve performance. Lazy loading delays loading images until they’re needed, reducing initial load times. Here’s an example:
<img src="example.jpg" loading="lazy" alt="Description of the image">
Add the
loading="lazy"
attribute to all non-critical images.Image Formats: The format of images can also affect performance. Use the following recommendations:
- WebP or AVIF: For general-purpose images to balance quality and performance.
- JPEG: For photographs if compatibility is a concern.
- PNG: For graphics with transparency or high fidelity.
- SVG: For icons, logos, and vector graphics.
- Avoid GIF: Use WebP or CSS animations instead for animations, as they perform better.
Hope this helps!
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