@correlucas
Posted
👾Hello Siddharth, Congratulations on completing this challenge!
I saw your solution preview site and I think it's already really good. Here’s some tips for you to improve it:
THE PICTURE TAG is a shortcut to deal with the multiple images in this challenge. So you can use the <picture>
tag instead of importing this as an <img>
or using a div with background-image
. Use it to place the images and make the change between mobile and desktop, instead of using a div
or img
and set the change in the css with display: none
with the tag picture is more practical and easy. Note that for SEO / search engine reasons isn’t a better practice import this product image with CSS since this will make it harder to the image. Manage both images inside the <picture>
tag and use the html to code to set when the images should change setting the device max-width
depending of the device desktop + mobile.
Check the link for the official documentation for <picture>
in W3 SCHOOLS:
https://www.w3schools.com/tags/tag_picture.asp
Save your time using a CSS RESET to remove all default settings that are annoying as the margins, paddings, decorations and optimize it making easier to work,see the article below where you can copy and paste this css code cheatsheet: https://piccalil.li/blog/a-modern-css-reset/
✌️ I hope this helps you and happy coding!
Marked as helpful
@siddharth-1407
Posted
@correlucas Thanks Lucas! I was familiar with the PICTURE TAG but i didn't know we could change the image like that depending on the device. I've no idea about good or bad practices in regards to SEO, i understand how its not a good practice. Ill practice improving to that end.