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

Blog Preview Card | HTML CSS

candicoded 180

@candicoded

Desktop design screenshot for the Blog preview card coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

P

@Islandstone89

Posted

Good job! Here are a few suggestions.

HTML:

  • The illustration image is decorative, meaning the alt text should be empty: alt="".

  • Don't use words like "photo" in the alt text, screen readers will recognize it as an image. I would also include the name of the person, something like: "Headshot of Gary Hooper".

CSS:

  • It's good practice to include a CSS Reset at the top.

  • Change the height on body to min-height - this way, the content will not get cut off if it grows beneath the viewport.

  • Remove the percentage width on the card. Add a max-width in rem, to prevent it from getting too wide on larger screens.

  • Use px instead of % for border-radius.

  • font-size must never be in px. This is bad for accessibility, as it prevents the font size from scaling with the user's default setting in the browser. Use rem instead.

  • As the design doesn't change, there is no need for any media queries. When you do need them, they should be in rem, not px.

Marked as helpful

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