
Solution retrospective
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.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @MohammedOnGit
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