Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 3 months ago

HTML5: For the structure of the webpage CSS3: For styling the card and

Sujit Dhar•50
@sujitdhar014
A solution to the Blog preview card challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Carlos Alberto da Silva•300
    @slayer-br
    Posted 3 months ago

    Hi sujitdhar014, great job putting together this solution! 🌟 Here's some feedback that might help you refine it further:

    ✅ What’s Working Well: Clean structure: The code is well-organized and easy to follow, with clear use of classes and spacing. Nice use of CSS variables for colors!

    Typography & color usage: The font, weights, and color palette closely match the design spec and create a polished look.

    Responsiveness: The layout adapts reasonably well for small screens thanks to the centered flexbox approach and max-width. Good use of padding for spacing!

    🧠 Suggestions for Improvement:

    1. Semantic HTML: Consider replacing the <div id="container"> with a more semantic element like <article>, since this is a blog card. Similarly, the publication date in <h3> could be a <time> element with a datetime attribute.

    The button labeled "Learning" is used more like a label/tag, so a <span> or <p> with appropriate styling would be more semantically correct than a <button>.

    1. Accessibility: The main image (illustration-article.svg) has an empty alt attribute. If it’s decorative, that’s fine, but consider clarifying intent. If it's informative, include descriptive alt text.

    For better screen reader support, consider using landmarks (like <main> or <section>) and ensure all text content is clearly structured for accessibility tools.

    1. Layout and Responsiveness: The layout works well on mobile-sized screens, but consider testing at larger breakpoints (like tablets or small laptops). The fixed width might feel a bit narrow on wider screens. A media query with max-width: 600px and some scaling adjustments could help.

    Also, adding hover or focus states for interactive elements (like the button, even if changed to a span) would improve usability.

    1. Code Reusability & Readability: You did a great job keeping the styles modular. One small improvement could be breaking the styles into sections or using comments to separate major areas (e.g., layout, typography, components).

    You might also consider using class-based styles for structure instead of relying on selectors like #container img:first-child, which can be harder to scale.

    1. Design Accuracy: The general design is very close! One small tweak might be in font sizing and line height for better readability and closer alignment to the original. Also, spacing around the author section could be fine-tuned to better match the mockup.

    ✨ Overall, this is a solid implementation with good attention to detail. With a few adjustments to semantics and accessibility, you’ll be on track to a more robust and production-ready solution. Great work! Keep it up! 🚀

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub