@MelvinAguilar
Posted
Hi there 👋. Good job on completing the challenge ! I have some feedback for you if you want to improve your code.
HTML:
- Use the
<footer>
tag to wrap the footer of the page instead of the<div class="attribution">
. The<footer>
element contains information about the author of the page, the copyright, and other legal information.
- 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="assets/images/icon-sedans.svg" alt aria-hidden="true">
<img src="assets/images/icon-suvs.svg" alt aria-hidden="true" >
<img src="assets/images/icon-luxury.svg" alt aria-hidden="true" >
- To center the component in the page, you should use Flexbox or Grid layout. You can read more about centering in CSS here. You can read more about centering in CSS here.
body {
/* height: 100%; */
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
#container {
display: flex;
max-width: 90rem;
/* margin: 0 auto; */
/* margin-top: 8rem; */
margin: 0.5rem;
}
- Use
max-width: 40rem;
to#container
selector instead ofwidth: 40rem;
, this will make the container card a bit responsive on mobile and set the element's maximum width to 40rem.
I hope you find it useful! 😄 Above all, the solution you submitted is great!
Happy coding!
Marked as helpful
@vitorantonionne
Posted
@MelvinAguilar great details, thanks.