Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Blog Preview Card Html and Css

Ajibona•210
@ajibona
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?

Im so happy to have complete these project and make it responsive what really makes me happy being part of these challenge and finding a solution to it i feel like i did something great. i can"t wait to try another challenges and learn something new

What challenges did you encounter, and how did you overcome them?

i have always find it really hard to make my own exactly like the design i try spending some couples of hours on it and try make sure it looks exactly like the design and im so happy how it later turns out. making it responsive its really im so happy i faced it all

What specific areas of your project would you like help with?

Any feedback will be ok its keep me learning and stay on tracks.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

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

    Hi, congrats on giving this challenge a try!

    Here is a list of things I noticed that could be improved to enhance your solution and possibly your other projects:

    • It would be great to have a personalized README. There is a template in the project files. Remove what you don't need and add more info about the challenges you faced and the good things you learned. Having a good README in your project can be very beneficial for someone reviewing your GitHub profile. It creates a good impression.
    • Remove the elements you don't need from your HTML.
    • You can simplify your HTML by removing this inner section. I understand you used it for the black border animation, but you can achieve this with a pseudo-element on your card.
    • The card image is meaningful and is related to the blog topic, so you should not use a background image here. Instead, use an img element with a proper alt attribute.
    • You should not skip headings. Use another HTML element if necessary, but keep them in order (h1, h2, h3, etc.). This helps with understanding the page structure and content organization. The date is not a heading. The author’s name is not a heading.
    • This is a preview card leading to a blog post, so you need a link in the heading.
    • You don't need to wrap everything in a section; it's not necessary here. You already have the <main> landmark, so you can go straight to your card div.
    • You need to add a modern CSS reset at the top of your stylesheet in all your projects. This will help you focus on clean code and ensure better cross-browser support. Look up for Andy Bell's css reset or Josh Comeau.
    • Use min-height on your body, not just a simple height, as content can grow if the user increases the font size.
    • You should not use a fixed height for elements containing text. The amount of text can vary, and the font size might be increased by users who need larger text.
    • You don't want to use a fixed width in pixels for the same reason. As the text size increases, the content needs to adjust accordingly. Use relative units such as rem and a max-width value.
    • You should not apply styles directly to the HTML element. Add a class and style it through the class. For example, you set a width of 30px on the img element. If there are other images on the page, they will all be 30px wide.
    • Overall, you need much better structure in your HTML and CSS. Specifically, the CSS is hard to navigate and understand. Work from top to bottom, left to right. Organize your HTML with the correct semantic elements.

    There are still other things I could comment on, but this is already quite a long list. Let me know if anything is unclear. Once you've refactored your solution, I can take another look and point out additional areas for improvement.

    Cheers, and 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 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.

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