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

3-column-preview-card-component

jamilgillani•110
@jamilgillani
A solution to the 3-column preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)
Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

  • Gwenaël Magnenat•1,540
    @gmagnenat
    Posted 4 months ago

    Hi,

    Your project is well-structured and functional, but there are some improvements you can make to enhance its accessibility, maintainability, and best practices.

    HTML & Accessibility Improvements

    • Load stylesheet after Google Fonts Link your stylesheet after the Google Fonts link in your <head> to prevent a flash of unstyled text (FOUT).

    • Duplicate stylesheet link You have two links pointing to the same stylesheet in your <head>. Remove the duplicate to avoid unnecessary requests and potential conflicts.

    • Missing <main> landmark A <main> element should wrap the primary content of your page for better accessibility and screen reader navigation. This helps assistive technologies understand the structure of your page.

    • Use <button> vs <a> correctly Buttons should be used to trigger actions (e.g., submitting forms, opening modals), while links should be used for navigation to different pages. Use the correct element for each purpose.

    • Unnecessary <section> element A <section> should be used when it groups multiple related content blocks and includes a heading (e.g., <h2>). Since your content does not require this, a simple <div> is more appropriate.

    • Incorrect file path for stylesheet Your stylesheet is currently inside the /images folder. It’s better to place it in a /css folder or keep it at the root near your HTML file for better organization.

    CSS Best Practices

    • Missing modern CSS reset A CSS reset helps normalize styles across different browsers. Consider using Andy Bell’s or Josh Comeau’s modern reset for consistency in styling.

    • Avoid styling HTML elements directly Only apply global styles to HTML elements if they are part of a reset. Instead, use class-based styles to keep styles modular and reusable. This makes your styles more maintainable in larger projects.

    • Use rem in media queries Avoid using px in media queries since it does not respect users’ custom browser font sizes. Using rem improves accessibility and adaptability, especially for users who modify their browser’s default font size.

    These changes will improve your project’s accessibility, maintainability, and scalability. Following these best practices will also make your codebase more structured and easier to work with in the long run. Let me know if you need clarification or further guidance!

    Happy coding! 🚀

    Marked as helpful

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 1st-party linked stylesheets, and styles within <style> tags.

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.

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

Oops! 😬

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

Log in with GitHub