cassg
July 31, 2025, 6:46pm
1
Tell us what’s happening:
Not sure where I have gone wrong, maybe someone can take a look at this for me?
Your code so far
<!DOCTYPE html>
<html lang="en">
<head>
<title>Cookie Cake Recipe</title>
</head>
<meta charset="UTF-8">
<body>
<h1>Cookie cake</h1>
<p>chocolate chips</p>
<h2>Ingredients</h2>
<ul>
<li>chocolate chips</li>
<li>flour</li>
<li>sugar</li>
<li>butter</li>
<h2>Instructions</h2>
<ol>
<li>add the ingredients</li>
<li>mix the ingredients</li>
<li>put onto baking sheet</li>
<li>bake in oven</li>
<img src="https://cdn.freecodecamp.org/curriculum/labs/recipe.jpg" alt="Cookie Cake"
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Challenge Information:
Build a Recipe Page - Build a Recipe Page
a2937
July 31, 2025, 6:47pm
2
You’ve seemed to not closed your body element nor your img element.
Additionally your meta element should be inside your head element.
1 Like
ILM
July 31, 2025, 6:53pm
3
cassg
July 31, 2025, 6:56pm
4
Thx, I went back and fixed the img part, the issue still seems to be at the beginning. it isn’t accepting the part where I put < html lang=“en” >
cassg
July 31, 2025, 6:52pm
5
Tell us what’s happening:
Okay, so I fixed several things already but it still doesn’t accept it completely. I wonder where I went wrong…?
Your code so far
<!DOCTYPE html>
<html lang="en">
<head>
<title>Cookie Cake Recipe</title>
<meta charset="UTF-8">
</head>
<body>
<h1>Cookie cake</h1>
<p>chocolate chips</p>
<h2>Ingredients</h2>
<ul>
<li>chocolate chips</li>
<li>flour</li>
<li>sugar</li>
<li>butter</li>
<h2>Instructions</h2>
<ol>
<li>add the ingredients</li>
<li>mix the ingredients</li>
<li>put onto baking sheet</li>
<li>bake in oven</li>
<img src="https://cdn.freecodecamp.org/curriculum/labs/recipe.jpg" alt="Cookie Cake">
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Challenge Information:
Build a Recipe Page - Build a Recipe Page
cassg
July 31, 2025, 7:11pm
6
These are the errors that I am getting.
Failed:2. You should have an html element with lang set to en.
Failed:3. You should have a head element within the html element.
Failed:8. You should have a body element within your html element.
ILM
July 31, 2025, 7:14pm
7
what does the html validator say? did you test your code with that?
cassg
July 31, 2025, 7:15pm
8
Sorry about that, it was an accident. Do you have any idea why it would be still telling me these errors?
Failed:2. You should have an html element with lang set to en.
Failed:3. You should have a head element within the html element.
*Failed:8. You should have a body element within your html element.
cassg
July 31, 2025, 7:52pm
11
I don’t quite understand since it doesn’t seem to be anything wrong with the code except for the beginning steps.
ILM
July 31, 2025, 8:20pm
12
it says that h2 is not allowed as a child of ul, so look at your ul
is there something there that needs fixing?
put that together with error number 5, unclosed ul element
1 Like
cassg
July 31, 2025, 9:13pm
14
Thank you, after taking a step away from it and coming back to it, I fixed it! Your suggestion really helped and made me realize some other things that I didn’t do.