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

Used Semantic element and Media query

Prince Obot•20
@PRINCE-OBOT
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?

Using custom font and root pseudo class

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

Understanding custom font was not easy for me, after series of explanation from ChatGPT I then got the concept.

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

Understanding Media Query more efficiently.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Petter Torst Saatvedt•180
    @PetterTSaatvedt
    Posted 7 months ago

    Great work! The solution pretty much identical to the design, with the exception of what looks like a line height difference in the description. Nonetheless, the html is semantic, well-structured, readable, and covers important accessibility requirements!

    Here's a few things I noticed while reviewing your code, which could be of use in future projects:

    1. I noticed you were using a h1 tag in your component. As the h1 tag is usually reserved for the main heading on a web page (and assuming that the component would be part of a web page with multiple components) it would be better to use the h2 tag in this instance. Also, it is good practice to not skip header tag orders, so considering you are also using a h3 tag, updating the h1 to a h2 will now mean that you are not going directly from a h1 to a h3 :-)

    2. I see that you are specifying font and text color for multiple of your css classes. To slim down the css file, and avoid repeatability as much as possible, you could add both the font-family and your "standard" font color inside the body selector, and remove all other declarations of those found elsewhere in the css file. Essentially, this means that all elements of the page will inherit the font and font color, considering they're all children (or children of children etc) from the body element. Now, in the instances of some text requiring different colors, you can keep the css as it is, as they will now override the inherited color :-)

    Keep up the good work!

    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.

Oops! 😬

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

Log in with GitHub