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

Blog preview card component with html and css

accessibility
Anita•110
@Anita-Liberatore
A solution to the Blog preview card challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


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

This Blog Preview Card project demonstrates a clean and modern component-based design using semantic HTML5 and modular CSS. It's a great example of how to build reusable UI elements while following web development best practices.

✅ Key Strengths Semantic & Accessible HTML The structure uses proper semantic tags (<article>, <main>, <h2>, etc.) and ARIA attributes to ensure screen reader compatibility and accessibility.

Responsive & Scalable Styling Clean and scalable CSS using custom properties (CSS variables) allows for easy theming and consistency across the design.

Optimized Performance Images are set with loading="lazy" and explicit width/height attributes to reduce layout shift and improve page performance.

Modern UI Design The layout mimics a professional card-style component with attention to spacing, typography, and color contrast.

Best Practice Fonts Integration Google Fonts are loaded efficiently with preconnect to optimize performance and visual rendering.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Piwko Marcin•200
    @PiwkoO
    Posted 4 months ago

    Hey, your solution looks great and I can see that you put a lot in your work. Especially usage of variables and that you use width/height attributes on HTML elements what I should probably do myself more.

    I have a suggestion to help you make it even better. You should try to focus more on designs and replicate them as much as you can and use more semantic elements which later on will help you with SEO and website positioning. I know it's a small project but it's great to build good habits from the beginning.

    Wish you luck and keep doing a great work!

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

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