Product Preview Card. Mobile First Approach. @media at 700px.
Design comparison
Solution retrospective
-This was the first time I worked with 'em' and 'rem' as units and took a mobile first approach and I think I came quite close to what it's supposed to look like
What challenges did you encounter, and how did you overcome them?- I struggled to change the picture at different screen sizes
- After a while I found a video by Web Dev Simplified that helped me out a lot https://www.youtube.com/watch?v=fp9eVtkQ4EA and after some trial and error I figured out a solution that works
- Any advice on better understanding 'em' , 'rem' and when to use which one would be appreciated as well as any improvements related to structure of my code
Community feedback
- @danielmrz-devPosted 6 months ago
Hello there!
Congrats on completing the challenge! ā
Your solution looks excelent!
I have just one suggestion:
š To improve semantic clarity, try to maintain the titles hierarchy with
<h1>
,<h2>
<h3>
, and so on.It's more than just text size ā it's about structuring your content effectively:
<h1>
to<h6>
are used to define HTML headings, with<h1>
being the most significant.
While these adjustments might not alter the visual appearance much, they significantly enhance semantic clarity, SEO optimization, and accessibility.
Hope this suggestion proves helpful! Keep up the great work!
Marked as helpful0@GD-neoPosted 6 months agoThank your for the feed back @danielmrz-dev. Am I always supposed to work 'top down' when using the header elements (<h1> first and then work down the hierarchy)? My thinking was that
<h1>Gabrielle Essence Eau De Parfum</h1>
was the main/most important header on this page which is why I decided to give it the <h1> and make 'Perfume' a <h2>. Thank you again for the feedback - I hope this question makes some sense.0 - @0xabdulkhaliqPosted 6 months ago
Hello there š. Congratulations on successfully completing the challenge! š
- I have a suggestion regarding your code that I believe will be of great interest to you.
HTML š·ļø:
- I need to address a minor semantic improvement which may help accessibility devices to properly announce the old price of the perfume.
- Currently the old price is not being properly announced, you have used
p
element for that withtext-decoration: line-through
css property.
- Instead of customizing
p
there's actually a native semantic html element which comes handy in these situations. it isdel
element
- So you can use like this
<del>$169.99</del>
- These are the tips which improves the accessibility in real world situations.
- If you have any questions or need further clarification, you can always check out
my submission
and/or feel free to reach out to me.
.
I hope you find this helpful š Above all, the solution you submitted is great !
Happy coding!
Marked as helpful0@GD-neoPosted 6 months agoThanks for the feedback @0xabdulkhalid. I had never heard of the <del> element but will remember for the next time its needed.
0
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