Learn Basic CSS by Building a Cafe Menu - Step 1

Tell us what’s happening:
Describe your issue in detail here.
I have asked already but never got a correct answer. Hope someone can help.

Below are 2 screenshots of the same thing for 2 different projects.
#1 is for car
#2 is for coffee

#1


This is exactly what I copy n paste doesnt work. So I add the closing bracket in picture below and still doesnt work.

#2
Directions under hints tell me I need to add what is already there.

This being the start of the second project should be more clear or obviously easier because why am I running into an issue. So much time wasted when I have tried everything. Even copied from the previous project which says it is correct. So why isnt it correct on this project???..

Your code so far

<!DOCTYPE html>
<html lang="en" </html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

Challenge: Learn Basic CSS by Building a Cafe Menu - Step 1

Link to the challenge:

<!DOCTYPE html>
<html lang="en" </html>

Make sure both your opening and closing tags are complete and have <>.

Tell us what’s happening:
I feel I have been doing this correctly but now says what I am doing is incorrect. I take the close part off and on and still gives me same error message.

<html lang="en" so this isnt correct?

Hint “You should have an opening <html> tag with a lang attribute of en.”

Your code so far

<!DOCTYPE html>
<html lang="en"</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

Challenge: Learn Basic CSS by Building a Cafe Menu - Step 1

Link to the challenge:

you are missing the > at the end of this opening tag

Hello,

Yes, I have tried that as well. Here is a screenshot.

why did you place the lang attribute outside the opening tag?
All HTML attributes must be placed within the respective opening tags of their elements.

Ill go back and check the cat one. see what I am doing different.

I checked my cat one and this one worked:
Doesn’t work on coffee. Says I need closing bracket. Screenshot below I copied my cat html tag and placed it in coffee and doesn’t work. Says I need a closing bracket this time. Don’t see how I am messing it up by just coping and pasting. Should work right?

Below is the screenshot from the cat project.

now you have the proper opening tag, but no closing tag

Ok, so how do I close it since I dont use this (< / html >)

I have tried everything. All the screenshots show the different ways. Even showed you screenshot from the cat one which worked(only for cat tho).

Really going to take me hours to figure this out? why isnt the same as the cat one? when it is the same thing…

my friend, an important rule of all HTML elements is that they start with an opening tag and end with a closing tag (unless they are self-closing tags like img)

All you have to do is focus on the correct syntax.
All tags have < at the start and > at the end.
So when you wrote:
<html lang="en"> this was a correct opening tag, but then when you wrote
<html lang="en" this was missing the > angled bracket at the end

Then after you write a correct opening tag, you must write a correct closing tag.
</html> this is a correct closing tag for the html element.

So combine the correct opening tag with the correct closing tag.

(the cat photo app has both, but you need to scroll down to see the closing tag at the very bottom of the file)

1 Like

Hello,

I was doing all of that. I finally figured out the issue by trial and error. Someone else gave me similar advise as you. So Im not sure if we are confused with what each other are saying or what but here is the screenshot of what worked.

Ok, so what happened was I didnt need but I needed
then add closing tag on bottom line.

I didnt realize closing tag had to be on bottom line for this. Once you said check the bottom that made me realize I should try html on the bottom line. Once I did that it worked as you can see in the screenshot.

So the main 2 issues out of all my trials was doing exactly and not dropping to the bottom line.

Thank you for assisting again.

1 Like

actually it does not need to be on a separate line at all
you can put the closing tag on the same line (so long as you don’t delete the > of the opening tag).

Try it please. It is important that you understand this.

edit: here’s an example of an opening tag and a closing tag on the same line
<p>this is a paragraph opening tag followed by a closing tag</p>
or like this
<div></div>
or on separate lines like this

<body>
</body>

all of these are valid

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.