Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Commenting a commented markup (Nested comments)

Tags:

html

How can I easily comment and uncomment a big chunk of HTML markup that that includes some comment?

<body>
a lot of markups
 <!-- comment -->
a lot of markups
 <!-- comment -->
a lot of markups
</body>

Following do not work as desired (closing --> stops the comment section):

<body>
  <!-- 
    a lot of markups
     <!-- comment -->
    a lot of markups
     <!-- comment -->
    a lot of markups
   -->
</body>

Is there any alternative method?

like image 484
Handsome Nerd Avatar asked Oct 20 '25 06:10

Handsome Nerd


1 Answers

If you have no </style> and */ tag in comment area use:

<style>
/*
comment
*/
</style>

If you have no </script> and */ tag in comment area use:

<script>
/*
comment
*/
</script>
like image 114
Handsome Nerd Avatar answered Oct 22 '25 19:10

Handsome Nerd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!