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

responsive Recipe page

bolojutsu•30
@bolojutsu
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?

What i'm most proud of is being able to set up each section effectively. what I would do different next time is probably use the section tag element instead of only using divs.

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

Most of the challenges that I had was during the css process, there many times where I struggled to align different components with each other.

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

Not a specific area but what i would want help in is organizing and simplifying my code so that its not so long especially when it comes to css.

A more specific area that I would want help in is knowing when is it best to use flex or grid when displaying components.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Mohammed Ibrahim•640
    @MohammedOnGit
    Posted 10 months ago

    Hello bolojutsu!

    Your HTML code is structured well, but there are several improvements that can be made in terms of web best practices, accessibility, SEO, and WCAG compliance. Below are my suggestions and recommendations for each area:

    General HTML Best Practices Spelling Mistakes:

    Correct common typos such as: "Ommlet" → "Omelette" "vegastbles" → "vegetables" "intructions" → "instructions" "Protien" → "Protein" "fillngs" → "fillings" "Approximatly" → "Approximately" "Table Sppon" → "Tablespoon" "fluffer" → "fluffier" "minuet" → "minute" Consistent Heading Structure:

    Use <h1> only once for the main page title to improve semantic structure. Subsequent sections should use <h2> or <h3>.

    For example, replace:

    <h1>Preparation time</h1> with <h2>Preparation time</h2>
    <h1>Ingredients</h1> with <h2>Ingredients</h2>
    

    Keep a logical hierarchy of headings. Accessibility (WCAG 2.1 Compliance) Image alt Attributes:

    The image element <img src="image-omelette.jpeg" alt="" /> should have a meaningful alt text describing the image to improve screen reader accessibility. Example: <img src="image-omelette.jpeg" alt="A plate of freshly cooked omelette" /> Accessible Color Contrast:

    Ensure sufficient color contrast between text and background colors to meet WCAG 2.1 standards (minimum contrast ratio of 4.5:1 for normal text). This would be handled in your styles.css, so double-check your color choices. ARIA Landmarks:

    Consider adding appropriate ARIA landmarks (e.g., <main>, <nav>, <footer>) to help assistive technologies understand the structure of your content. Example: Wrap the main content inside a <main> tag. Use of Lists:

    Ensure the ul elements are semantically appropriate (you've done this well for ingredients, instructions, etc.). However, consider using <dl> (definition lists) for nutrition facts as it represents key-value pairs more clearly.

    <dl>
      <dt>Calories</dt>
      <dd>227kcal</dd>
      <dt>Carbs</dt>
      <dd>20g</dd>
      <dt>Protein</dt>
      <dd>20g</dd>
      <dt>Fats</dt>
      <dd>22g</dd>
    </dl>
    

    Use of Language Attribute:

    The language is set correctly (lang="en"), but ensure that the specific variant (en-US, en-GB, etc.) is used depending on the region, especially for accessibility and SEO. SEO (Search Engine Optimization) Title and Meta Description:

    Your <title> is good but could be more descriptive for SEO purposes. Consider: Example: <title>Omelette Recipe | Easy 10-Minute Breakfast Recipe</title> Add a meta description for better search engine ranking. Example: <meta name="description" content="Learn how to make a classic omelette in just 10 minutes with this easy recipe, including optional fillings like cheese, vegetables, or meats." /> Heading Structure:

    Ensure your heading structure follows SEO best practices: use a single <h1> for the main heading (e.g., "Sample Omelette Recipe") and subsequent headings for different sections of the page.

    Performance Optimization Preload Important Assets:

    You are preconnecting to Google Fonts, but also consider preloading the font for faster loading:

    <link rel="preload" href="https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap" as="style" />
    

    Image Optimization:

    Use modern image formats like WebP instead of JPEG for better performance. Implement lazy loading for images to improve page load time:

    <img src="image-omelette.jpeg" alt="A plate of freshly cooked omelette" loading="lazy" />
    

    Mobile Responsiveness Viewport Meta Tag:

    The viewport meta tag is correctly set to ensure the site scales well on mobile devices:

    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    

    Conclusion By addressing these recommendations, your webpage will be more accessible, SEO-friendly, and optimized for performance. You did great! keep it up.

    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