Tell us what’s happening:
i have move the other elements in div but it still tells me to move other elements inside the new div
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cafe Menu</title>
<link href="styles.css" rel="stylesheet"/>
</head>
<!-- User Editable Region -->
<body>
<div id= "menu"<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
<h2>Coffee</h2>
</div>
</section>
</main>
</body>
<!-- User Editable Region -->
</html>
/* file: styles.css */
body {
background-color: burlywood;
}
h1, h2, p {
text-align: center;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Challenge Information:
Learn Basic CSS by Building a Cafe Menu - Step 20
Hey there! 
Looks like there are a couple of issues in your code:
- Your
div
tag isn’t written correctly, double-check the syntax.
- The closing
div
tag is in the wrong spot. The lesson explained where it should go, so review that and place it as asked there.
1 Like
Hi buddy See here is the code given in the instructions.
<body>
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
<h2>Coffee</h2>
</section>
</main>
</body>
Here, In it you need to put the content like h1 element
and below it’s inside a div element
When we wrap our elements inside div element then all the elements get kind of in a container
In your code kindly do remove id element
and put your div element
below you main element
Hope You Understand !
Hi there! Well, the lesson didn’t say to avoid wrapping any specific element. It clearly said:
“Add a div element inside the body element and then move all the other elements inside the new div.”
So yes, the main
element also needs to be wrapped inside the new div
.
Also, just to clarify — id
is not an element, it’s an attribute, and the lesson actually asks to add it, not remove it.
i have correct but i still get it wrong. help me pls
<div id= "menu">
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
<h2>Coffee</h2>
</div>
</section>
</main>
“Add a div element inside the body element and then move all the other elements inside the new div.”
Please review these again.
1 Like