Tell us what’s happening:
help me please I can’t find any answer I tried my best
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Cafe Menu</title>
<style>
h1, h2, p {
text-align: center;
}
</style>
</head>
<body>
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
<h2>Coffee</h2>
</section>
</main>
</body>
</html>
/* file: styles.css */
/* User Editable Region */
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cafe Menu</title>
<style>
h1 {
color: brown;
text-align: center;
}
h2 {
color: red;
text-align: center;
}
p {
color: black;
text-align: center;
}
</style>
</head>
<body>
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
<h2>Coffee</h2>
</section>
</main>
</body>
</html>
/* User Editable Region */
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0
Challenge Information:
Design a Cafe Menu - Step 14
The only thing you should be putting in your styles.css file is the code between the style tags.
I don’t understand can you write me the code that I
should write
What code is inside the opening and closing style tags here? Remove everything else you have added to your styles.css file. And copy/paste that code there.
1 Like
can you write the full code please
Hey, in your css-file you should only have CSS-code, not HTML code. Only the h1{…}, h2{…},p {…} lines and their values should be in there!
really? I didn’t know thank you
1 Like
it still doesn’t work give me the full code
we’re not supposed to send the full code, but the code you had in HTML under should be in the css file. it’s basically the same you already have now but only written in one line. just copy paste it from the HTML file into CSS but without tags <> etc.
1 Like
here’s my code it’s correct h1 {
color: brown;
text-align: center;
}
h2 {
color: red;
text-align: center;
}
p {
color: black;
text-align: center;
}
I’m waiting for an answer
You still need to link your css file to the html one.
It’s been so many times that I have learned it by heart.
ok look what I did now
<meta charset="utf-8">
<title>Cafe Menu</title>
<link rel="stylesheet" href="styles.css">
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
<h2>Coffee</h2>
</section>
</main>
h1 {
color: brown;
text-align: center;
}
h2 {
color: red;
text-align: center;
}
p {
color: black;
text-align: center;
}
If you are working through the curriculum in order, then this is the first time you will be using an external stylesheet, which will always be styles.css in fCC.
Please read the instructions again. All you are being asked to do in this step is copy/paste the styles inside the style tags nested in the head element of your index.html file into the styles.css file.
Learning to program on this site consists of following directions, carefully reading the instructions to understand what is expected, and being attentive to details. If you are just handed the code, you are not thinking things through; you are not following the directions; you are not attempting to understand the instructions; and you are not learning how to be attentive to details. So, no, I will not ruin your learning experience by just handing you the code!