Learn Basic CSS by Building a Cafe Menu - Step 22

I don’t get how I’m supposed to write out the comment. I tried this but its not working. Help?

My code so far :point_down:

<!-- 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>
  <body>
    <div>
      <main>
        <h1>CAMPER CAFE</h1>
        <p>Est. 2020</p>
        <section>
          <h2>Coffee</h2>
        </section>
      </main>
    </div>
  </body>
</html>
/* file: styles.css */
body {

/* User Editable Region */

  background-color: burlywood;

/* User Editable Region */

}
/* background-color: burlywood; */
h1, h2, p {
  text-align: center;
}

div {
  width: 300px;
}

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

Link to the challenge:

Commenting out code (whether a single line or a whole block) is a really useful debugging tool as it renders the code inactive. Any code which is commented out will be treated as a comment and therefore not executed at runtime.

I’m always commenting and uncommenting code to test it, to try to find out where bugs might be lurking.

To comment out a line of code in Javascript, all you need do is put /* at the beginning of the line and */ at the end. Anything between these markers is treated as a comment, even if it’s a multiline block of code.

(The other method for a single line comment only is to prefix the line with //. Anything which follows on the same line will be treated as a comment).

I would reset the lesson and then simply add those markers above to the existing line of code which should be commented out.

@igorgetmeabrain Thank you! This helped a lot :smiley:

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