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

Responsive Recipe page using HTML & CSS

Ibraghim•120
@Soy-Ibrag
A solution to the Recipe page 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?

In this project I don't have anything to be proud of, I think I could have done a better job, my CSS code could have been more organized, etc... I'm not satisfied with my results in this challenge and I hope I can learn from the mistakes I did.

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

I don't really know to be honest, I guess everything was a challenge to me, I struggled a lot with the layout itself, my CSS structure, paddings & margins, etc...

What specific areas of your project would you like help with?
  • Flexbox;
  • Responsiveness.
Code
Couldn’t fetch repository

Please log in to post a comment

Log in with GitHub

Community feedback

  • Mohammed Ibrahim•640
    @MohammedOnGit
    Posted 9 months ago

    Hello Soy-Ibrag!!!

    Congratulations for completing this challenge. Your HTML for the recipe page is clean and well-structured. Here are some suggestions for improvements:

    • Accessibility: Alt Text The alt text for your omelette image can be more descriptive for screen readers:
    <img src="assets/images/image-omelette.jpeg" alt="A simple omelette on a plate">
    
    • Consistent Heading Levels For better semantic structure, ensure that heading levels follow a logical order: You are using an h1 for the recipe title, followed by an h4 for the preparation time, which might break the logical flow. Consider using h2 for sections like "Preparation time," "Ingredients," "Instructions," and "Nutrition":
    <h2>Preparation time</h2>
    
    • Use <strong> Instead of <span class="bold"> You are using a span with the class "bold" to make text bold. Instead, use the semantic <strong> tag for emphasis:
    <p><strong>Total:</strong> Approximately 10 minutes</p>
    
    • Table Structure Your table looks fine but consider using <th> elements for the first column (Calories, Carbs, etc.) to improve semantic meaning:
    <tr class="border">
      <th scope="row">Calories</th>
      <td class="value">277kcal</td>
    </tr>
    
    • Add Meta Description Adding a meta description helps with SEO and provides a summary of the content:
    <meta name="description" content="A simple and easy-to-follow recipe for making a classic omelette with optional fillings.">
    

    These minor adjustments will improve accessibility, performance, and SEO for your recipe page!. Generally you did great. Keep it up!!!

    Marked as helpful
  • P
    Steven Stroud•11,890
    @Stroudy
    Posted 9 months ago

    Exceptional work! You’re showing great skill here. I’ve got a couple of minor suggestions that could make this stand out even more…

    • Using a <main> tag inside the <body> of your HTML is a best practice because it clearly identifies the main content of your page. This helps with accessibility and improves how search engines understand your content.

    • Having a clear and descriptive alt text for images is important because it helps people who use screen readers understand the content, making your site more accessible. It also improves SEO, as search engines use alt text to understand the image's context, helping your site rank better, Check this out Write helpful Alt Text to describe images,

    • Your heading elements <h1><h4> missing h2 h3, Heading elements should be in sequentially-descending order (e.g., <h1>, <h2>, <h3>) to create a clear content structure, improving accessibility and SEO. Skipping levels or using them out of order can confuse screen readers, affect search engine rankings, and make your content harder to understand.

          <h1>Simple Omelette Recipe</h1>
          <h4>Preparation time</h4>
    
    • Using a full modern CSS reset is beneficial because it removes default browser styling, creating a consistent starting point for your design across all browsers. It helps avoid unexpected layout issues and makes your styles more predictable, ensuring a uniform appearance on different devices and platforms, check out this site for a Full modern reset

    • I think you can benefit from using a naming convention like BEM (Block, Element, Modifier) is beneficial because it makes your CSS more organized, readable, and easier to maintain. BEM helps you clearly understand the purpose of each class, avoid naming conflicts, and create reusable components, leading to a more scalable codebase. For more details BEM,

    • Using rem or em units in @media queries is better than px because they are relative units that adapt to user settings, like their preferred font size. This makes your design more responsive and accessible, ensuring it looks good on different devices and respects user preferences.

    I hope you’re finding this guidance useful! Keep refining your skills and tackling new challenges with confidence. You’re making great progress—stay motivated and keep coding with enthusiasm! 💻

    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

Oops! 😬

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

Log in with GitHub