Tell us what’s happening:
I am unable to get past this module as I can’t seem to to comment out h1 and p elements
Your code so far
<!--Hello World Hello Paragraph-->
<h1>Hello World</h1>
<h2>CatPhotoApp</h2>
<p>Hello Paragraph</p>
-->
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (X11; CrOS x86_64 9901.77.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.97 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/comment-out-html
Originally all of the elements are commented together. You should remove that comment, then comment the <h1>
and <p>
elements individually.
Can you show me an example please?
Not sure if I understand removing the comment
Removing the comment means removing the <!--
and the -->
parts.
The original commented code looked like this:
<!--
<h1>Hello World</h1>
<h2>CatPhotoApp</h2>
<p>Hello Paragraph</p>
-->
After uncommenting, it’ll look like this:
<h1>Hello World</h1>
<h2>CatPhotoApp</h2>
<p>Hello Paragraph</p>
Now you have to comment the <h1>
and <p>
elements, but leave the middle <h2>
uncommented.
So I did this…
<!--Hello World-->
<h1>Hello World</h1>
<!--Hello World-->
<h2>CatPhotoApp</h2>
<!--Hello Paragraph-->
<p>Hello Paragraph</p>
<!--Hello Paragraph-->
Red X next to following: Comment out your h1 element so that it is not visible on your page. (same for p element)
That’s just adding comments, not commenting out existing code.
This is how to comment the <h1>
element:
<!--
<h1>Hello World</h1>
-->
Same with the <p>
element.
THANK YOU - finally got past it!
1 Like