Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Cafe Menu</title>
<style>
Coffee{
text-align: Center;
}
</style>
</head>
<body>
<header>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
</header>
<main>
<section>
<h2>Coffee</h2>
</section>
</main>
</body>
<html>
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36
Challenge: Step 12
Link to the challenge:
Would you please describe what is the issue and what are you expecting the code should behave?
Edit
Also what kind of error message do you get?
its on the style area
Error:" You should have an h1
selector in your style
element."
I think that gave you an answer to your code issue. But let me help you to understand how Style works.
Style is targeting HTML element, class name and id for an element and not the content that is inside the HTML tags
So if your HTML looks like this (short)
<h1>Hello world</h1>
<p class="className">I have class attribute</p>
<p id="idName"> I have Id attribute</p>
So in style tag or in css file (if separetade)
h1 {
color: blue;
}
.className {
color: pink;
}
#idName {
color: yellow;
}
in Style, Class name is using . (Period) and id using # (Hashtag).
Keep in mind that naming shall be identical what is in style tag and in html tag and also id must be unique
i did’t understand can you please give me the same code
teo-08
6
Instead of coffee write h1.
system
Closed
7
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.