Design comparison
Solution retrospective
This challenge was fun and it took less time compared to others, or may be I got better at things 😁
Any suggestions for improvements are welcome
Community feedback
- @MelvinAguilarPosted about 2 years ago
Hi @avinashdv 👋, good job on completing this challenge! 🎉
I like this solution for the challenge. Here are a few suggestions I've made that you can consider in the future if you're looking to improve the solution further:
- The
<h1>
element is the main heading on a web page. There should only be one<h1>
tag per page. The HTML Section Heading elements (Reference). This case requires thatSUVS
,SEDANS
, andLUXURY
be<h2>
elements. - The
Learn More
elements should beanchor
tags and not buttons because they redirect to another part of the page. - Car icons are for decoration purposes only, so they can be hidden from screen-readers by adding
aria-hidden="true"
and leaving its alt attribute empty.
I hope those tips will help you.
Good job, and happy coding!
Marked as helpful1@avinashdvPosted about 2 years ago@MelvinAguilar Thank you for the suggestions. I'll keep them in mind while coding for next challenge and take decisions wisely. 👍
1 - The
- @PhoenixDev22Posted about 2 years ago
Hi Avinash DV,
You already received some helpful feedback which is nice to see , just going to add some suggestions as well and don't mind if I re-iterate some ideas mentioned already
- About
<h1>
it is recommended not to have more than one h1 on the page. Multiple<h1>
tags make using screen readers more difficult, decreasing your site’s accessibility. In this challenge, as it’s not a whole page, you can have<h1>
visually hidden withsr-only
. Then you can swap those<h1>
with<h2>
.
- In this challenge, what would happen when the user click those learn more? In my opinion, clicking those "learn more" would likely trigger navigation not do an action so button elements would not be right. So you should use the <a>. For future use , it's a good habit of specifying the type of the button to avoid any unpredictable bugs.
To know when to use one or the other in a specific situation, you must understand that every action on site falls under two different categories:
1. Actions where users affect the website’s back-end or front-end.
2. Actions where users won’t affect the website at all.
Action where users affect the website itself is where you use a button. For example, sign-up and purchase actions are often buttons. The user in these situations are creating a new account and completing a monetary transaction, which are actions that affect the website’s back-end. Creating new posts or making comments are actions that change a website’s content and what the user sees.
Actions where users won’t affect the website are where you use a link. These actions that take users from one page to another without changing anything on the website’s back or front-end.
- Consider using
max-width
to the component that wraps the three cards.
- Add
border-radius
andoverflow hidden
to the main container that wraps the three cards so you don't have to setborder-radius
to individual corners.
- Consider using
min-height: 100vh
, that let the body grows taller if the content of the page outgrows the visible page.
- There are so many repeated styles in the CSS, the shared styles between the element should be one class and for the different styles in another class ( classes are manageable and reusable.) for example: .columnPreview for the shared styles like
padding, display: flex ...
, and for the different styles like background-color: .. you can :.sedans
... so on
- It' not recommended to capitalize in html, let css text transform take care of that. Remember screen readers won't be able to Read capitalized text as they will often read them letter by letter thinking they are acronyms.
Hopefully this feedback helps.
Marked as helpful0@avinashdvPosted about 2 years ago@PhoenixDev22 Thank you so much for suggestions and in detail walkthrough. I have made changes accordingly. 👍
0 - About
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