Basic html and html5 starter

How Do I Comment out HTML

<!-- This is the text to comment out -->
1 Like

how do i comment out h1 element and your p element, but not your h2 element.

Any text you want to comment out put this at the beginning:

<!--

And put this at the end of the text you want to comment out:

-->

Example:

<!--<h1>This is my h1</h1>-->
<h2>This is my h2</h2>
<!--<p>This is my paragraph</p>-->

So my H1 and P tag are comment out, but my H2 tag is still visible.

thanks for your help

1 Like

Use

<!-- some thing -->

I suggest you to use some text editor like Visual Studio Code which has the comment sections on it’s menu.

thanks for your help