Design comparison
Solution retrospective
Thx for any feedback
Community feedback
- @danielmrz-devPosted 11 months ago
Hello @learningtogetherua!
Your solution looks great!
I have a couple of suggestions for improvement:
- For semantic reasons, use
<h1>
for the main title. Here's a quick guide on how to use HTML headings:
The
<h1>
to<h6>
tags are used to define HTML headings.<h1>
defines the most important heading.<h6>
defines the least important heading. Only use one<h1>
per page - this should represent the main heading/subject for the whole page. Also, do not skip heading levels - start with<h1>
, then use<h2>
, and so on.- Also, still about semantic HTML, you can replace your
article
withmain
. The tag<article>
would make sense if it was part of a bigger website (it certainly would in real world), but since the card is all we have on the page,main
is more appropriate.
All these changes may have little or no visual impact but they make your HTML code more semantic and improve SEO optimization as well as the accessibility of your project.
I hope it helps!
Other than that, great job!
0 - For semantic reasons, use
- @AGutierrezRPosted 11 months ago
Hello there @learningtogetherua 👋. Good job on completing the challenge!
I have some suggestions about your code that might interest you.
General Structure and HTML:
-
Wrap the primary content within the
<main>
tag instead of using it as a standalone component like a<div>
. -
All the content should be contained within landmarks. Every page minimally needs a
<main>
element. -
Consider using
<picture>
tag that is commonly used for responsive images, here you can specify the difference image sources for different screen sizes and devices. For example:<picture> <source media="(min-width: 640px)" srcset="/images/image-product-desktop.jpg "> <img src="/images/image-product-mobile.jpg" alt=""> </picture>
Check that
srcset
andsrc
are correct and change themedia
if you want the desktop image to kicks in on a previous or later screensize.
CSS and Styling:
- Implement CSS custom properties to define and utilize project colors more easily.
- Avoid using
px
forfont-size
, you could read this article to learn why. Letter spacing and line height must not be inpx
, userem
for all the font-related properties. - Instead of fixed widths, employ
max-width
andmin-width
for flexible and responsive design. - Let the content decide the height of the elements. Use padding and margins strategically for this purpose.
- The
body
should not have itsheight
limited. Instead of usingheight: 100%
, usemin-height: 100vh
.
Accessibility and Semantic HTML:
- The icons/illustration images are decorative, so their alt text must be empty:
alt=""
.
I hope you find this helpful 😁. Most importantly, your submitted solution is fantastic!
Happy coding!
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