Design comparison
Solution retrospective
Any feedback is appreciated!
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hi there π. Good job on completing the challenge ! I have some feedback for you if you want to improve your code.
HTML:
- Use the
<main>
tag to wrap all the main content of the page instead of the<div>
tag. With this semantic element you can improve the accessibility of your page.
- You should use only one
<h1>
tag per page. The<h1>
tag is the most important heading tag, This can confuse screen reader users and search engines. This challenge requires thatSedans
,SUVs
andLuxury
are headings, but you can use the<h2>
tag instead of the<h1>
tag. You can read more about this here.
- Not all images should have alt text. 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:
<img src="./images/icon-sedans.svg" alt aria-hidden="true"> <img src="./images/icon-suvs.svg" alt aria-hidden="true" > <img src="./images/icon-luxury.svg" alt aria-hidden="true" >
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding and Happy New Year! πππ
Marked as helpful1@preetamvarunPosted almost 2 years ago@MelvinAguilar Thanks for the helpful feedback. Will definitely keep those things in mind!
1 - Use the
- @vanzasetiaPosted almost 2 years ago
Hello, Preetam!
You must add
<!DOCTYPE html>
on the HTML to make sure the website is in standard mode.Learn more about the issue β Quirks Mode and Standards Mode - HTML: HyperText Markup Language | MDN
Here are a few more ways you can do to improve this solution.
- Remove spaces between the equal sign for the
class
attributes. - Prefer unitless numbers for line-height values to avoid unexpected results. Learn more β line-height - CSS: Cascading Style Sheets | MDN
- Use a code-formatter. This way, your code base will have a consistent format, which makes it easier to read the code. I suggest using Prettier as your code-formatter.
I hope this helps. Happy new year!
Marked as helpful0@preetamvarunPosted almost 2 years ago@vanzasetia Thanks for your valuable feedback π
0 - Remove spaces between the equal sign for the
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