What do they mean that I should hide h1 and p

Tell us what’s happening:
Describe your issue in detail here.

Your code so far


<!--Hello world Too abcdefghijklmnopqrstuvwxyz-->
<h1>Hello World</h1>
<!--abcdefghijklmnopqrstuvwxyz-->
<h2>CatPhotoApp</h2>
<!--1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950-->
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<!--Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.-->

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 9; DL3PlusPro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.87 Mobile Safari/537.36

Challenge: Comment out HTML

Link to the challenge:

The text is:

Comment out your h1 element and your p element, but not your h2 element.

There are two main reasons to use comments. The first and most obvious would be to add a “comment” in the code. For example:

<p>text 1</p>
<p>text 2</p>
<!-- space left for text 3 -->
<p>text 4</p>

Sometimes it’s something like that often it is to permanently document the code.

The second, more subtle reason is to “hide” some code - to make the computer not run that code. You could just delete the code, but maybe you want to leave it in there in case you need it later. For example, if I have this:

<p>info A</p>
<p>info B</p>
<p>info C</p>

we are rendering three paragraphs. If we wanted to see what it looked like without the middle paragraph, we could do this:

<p>info A</p>
<!-- <p>info B</p> -->
<p>info C</p>

So, that paragraph code is still in there, but the browser will not “see” it, it is “hidden” from the browser and the user.

That is what you need to do for this challenge, following the instructions.

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