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

blog-card-challenge

sunettom•50
@sunettom
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

  • Vadim•20
    @hukvadim
    Posted 11 months ago
    1. Semantic HTML Strengths: The solution mostly uses semantic elements (button, p, div), but there are areas for improvement. Improvements: Consider using semantic HTML tags like article, header, footer, or section to better structure the content. Replace <div class="logo"> with a <figure> or <footer> if it represents the author section.
    <p> is appropriate for paragraphs, but avoid inline styles for accessibility and maintainability. 2. Accessibility Strengths: Language (lang="en") is correctly set. The viewport meta tag is present, which helps with responsiveness on mobile devices. Improvements: Add alt text to the images (img tag) for screen readers. The button should be more descriptive (e.g., <button aria-label="Learning Article">Learning</button>). Use relative font units like em or rem instead of absolute px values for better accessibility. Ensure color contrast is sufficient for readability (black text on a yellow background could be checked for contrast ratios). 3. Responsive Layout Strengths: The meta viewport tag helps with responsiveness. Flexible elements like p with controlled width (width:320px) help with managing layouts. Improvements: Ensure that the layout adapts well to different screen sizes, especially mobile. For example, use media queries in CSS to adjust the text size, button, and image placement for smaller screens. Avoid fixed widths like width: 320px for p elements, which can cause issues on smaller screens. Instead, use percentages or relative units (max-width: 100%). 4. Code Structure, Readability, and Reusability Strengths: The code is relatively clean and uses classes effectively. Improvements: Remove inline styles (like style="font-weight: 500; color:black;") and move them to the external CSS file for maintainability and reusability. Use more meaningful class names. For example, instead of bg-card, use something like card-background or card-container. Organize the CSS to follow the DRY principle (Don't Repeat Yourself) by grouping similar styles. Add comments where necessary to make the structure more understandable to other developers. 5. Design Consistency Strengths: The design seems visually appealing with consistent colors and spacing. Improvements: Ensure the final implementation follows the design exactly, especially on responsive breakpoints. Some spacing and size adjustments may be needed to maintain the design across screen sizes. Check font sizing for headers (<p style="font-weight:800; font-size:20px;">) and ensure it aligns with the design expectations. Overall, the solution uses a reasonable structure but could benefit from more semantic HTML, accessibility improvements, and better responsiveness across screen sizes. The code can also be refined for reusability and maintainability.

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