Tell us what’s happening:
what’s wrong exactly please
Your code so far
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Cafe Menu</title>
<!-- User Editable Region -->
<style>
h1{value :text-align;}
</style>
<!-- User Editable Region -->
</head>
<body>
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<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/108.0.0.0 Safari/537.36
Challenge: Learn Basic CSS by Building a Cafe Menu - Step 11
Link to the challenge:
Hi there, did you have a specific question about this challenge?
i didn’t know how to do it
element {
property: value;
}
Ok, so that’s the syntax for creating a style declaration in CSS (as shown in the challenge).
So replace the word ‘element’ with the name of the element you wish to style. Then replace the word ‘property’ with the type of style declaration (e.g. ‘text-align’, ‘background-color’ etc). Then replace the word ‘value’ with the specific property value you need.
EXAMPLE:
p {
color: red;
};
2 Likes
The instructions are:" Center your h1
element by setting its text-align
property to the value center
."
It should look like this in your styles.css tab that is next to your index.html tab.
h1{
text-align: center
}
Your h1 is your element selector. Your text-align is your property. Your center is your value.
xAthenax:
h1{ text-align: center }
This code is correct. The code you originally posted was not correct.
I’m not the questioner. I was providing help to the original questioner with this solution.
Oh yeah, my bad… (+ a few characters to allow me to post this).
system
Closed
July 14, 2023, 6:07am
10
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.