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

Responsive Flex card

iOtele•20
@iOtele
A solution to the Blog preview card challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


-Aligning the image to center was a challange -Was the use of .root in css neccsary -I was able to learn using from the guild -The use of flex was very helpful to set the div in columns -How more can I continue to develop best in html and css

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Daniel 🛸•44,830
    @danielmrz-dev
    Posted over 1 year ago

    Hello @iOtele!

    Your solution looks great!

    I have a suggestion for improvement:

    • Use <main> to wrap the main content instead of <div>.

    📌 Tags like <div> and <span> are typical examples of non-semantic HTML elements. They serve only as content holders but give no indication as to what type of content they contain or what role that content plays on the page.

    This tag change does not impact your project visually and makes your HTML code more semantic, improving SEO optimization as well as the accessibility of your project.

    I hope it helps!

    Other than that, great job!

    Marked as helpful
  • Hassan Moataz•1,860
    @hassanmoaa
    Posted over 1 year ago

    Hello @iOtele!

    Great Job solving the challenge mate congrats 🎉

    Some suggestions for improvements.

    For the font-size it's is better to use rems and ems but px for this project is no big deal.

    font-size: 13px;

    • i see you using pixels for many elements, never use pixels for font-sizes in any element, here's why:

    • Certain font-related CSS properties will render your site completely inaccessible if their value is declared using pixels even once.

    Which properties are affected?

    All of these properties must never ever be declared in pixels:

    • font-size
    • line-height
    • letter-spacing

    If you've used pixels to define any of the above style properties, these will not respect the user's font size preferences!

    • You should use ems, and rems for font-sizes would be better

    This article may help:

    https://fedmentor.dev/posts/font-size-px/

    ➖➖➖➖➖➖➖➖

    Use <main> to wrap the main content instead of <div>. * 📌 Tags like <div> and <span> are typical examples of non-semantic HTML elements. They serve only as content holders but give no indication as to what type of content they contain or what role that content plays on the page. This tag change does not impact your project visually and makes your HTML code more semantic, improving SEO optimization as well as the accessibility of your project.

    ➖➖➖➖➖➖➖

    You can’t put text in plain divs or without an semantic tag:

    Heading is defined with <h1> to <h6> tags. It is important to use headings to show the HTML document structure.

    <h1> headings should be used for main headings, followed by <h2> headings, then <h3>, and so on up to <h6>

    Other than that you're good, keep up the good work!

    Marked as helpful
  • Petrit Nuredini•2,860
    @petritnuredini
    Posted over 1 year ago

    Congratulations on completing your Blog Preview Card project! It's an excellent achievement, and I'm thrilled to see your dedication to developing your front-end skills. Here are a few recommendations for improvements:

    1. Semantic HTML Tags:

      • Consider using more semantic HTML tags to enhance the accessibility and structure of your code. For example, you could use <article> for the main content area and <footer> for the bottom attribution section. This not only makes your HTML more readable but also helps with SEO and accessibility. Learn more about semantic HTML here.
    2. Alternative Text for Images:

      • It's important to provide alternative text for images using the alt attribute. This is crucial for users who rely on screen readers. For instance, <img src="assets\images\image-avatar.webp" alt="Greg Hooper's avatar" /> provides more context. Read about the importance of alt text here.
    3. CSS File Naming:

      • The naming of your CSS file as index.css might be a bit generic. Consider renaming it to something more descriptive, like blog-preview-card.css. This helps in maintaining and understanding the purpose of the stylesheet, especially in larger projects.

    Keep pushing the boundaries and exploring new challenges in web development. Your progress is impressive, and each project takes you one step closer to mastery. Keep up the great work 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

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

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