/* 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
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.