Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Product Card Component with HTML and CSS

@j-pcgoncalves

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

I am proud of how fast i completed the challenge. Despite it being fairly easy, i enjoyed the whole process and the finished product is good, in my opinion. Any feedback is welcome!

Community feedback

Daniel 🛸 44,270

@danielmrz-dev

Posted

Olá @j-pcgoncalves!

Seu projeto está ótimo!

Eu tenho uma sugestão sobre o seu código que pode te interessar:

📌 Você pode usar a tag <picture> quando tiver diferentes versões da mesma imagem 🖼.

Usar a tag <picture> ajudará a carregar a imagem correta para o dispositivo do usuário, economizando largura de banda e melhorando o desempenho. Exemplo:

<picture>
    <source media="(max-width: 460px)" srcset="{caminho da imagem desktop aqui}">
    <img src="{caminho da imagem mobile aqui}" alt="{texto alternativo aqui}">
</picture>

Espero que isso ajude!

Fora isso, excelente trabalho!

Marked as helpful

1

@j-pcgoncalves

Posted

Olá @danielmrz-dev!

Não conhecia essa tag de HTML e da utilidade dela, mas sem dúvida que a vou usar nos próximos projetos! É mais fácil do que esconder imagens com CSS para alternar entre imagem de desktop e mobile.

Muito obrigado pelo Feedback!

1
Daniel 🛸 44,270

@danielmrz-dev

Posted

@j-pcgoncalves

Pois é, é uma tag bem útil! Elimina a necessidade de utilizar media queries pra fazer a troca das imagens, consequentemente, reduz código desnecessário 😊

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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