1

I'm having trouble commenting out sections of HTML in cases where the sections already have comments. This is because the closing tags of the comment syntax conflict. Is there any VS Code Extension that could ease my difficulty?

arunkumaraqm
  • 111
  • 2
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Dec 15 '22 at 10:10

1 Answers1

1

As far as I know, there is no extension, because the HTML syntax (or SGML) does not allow it.

As a workaround that should be used in exceptional cases only (you are warned due to expected errors in manual processing), you can use the following:

<head>
<title>Garden</title>
<!-- this is some comment 

<!- - this is some inner comment - ->

<!- - this is some sibling comment - ->

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="garden, home, plant">
<meta name="MS-HKWD" content="tree">
<meta name="MS-HKWD" content="pond">
<meta name="MS-HKWD" content="fish">
<meta name="MS-HKWD" content="flowers">
<meta name="MS-HKWD" content="health">
<meta name="MS-HKWD" content="health, relax">
<meta name="MS-HAID" content="botany">
this is the footer of comment -->
<link href="../design.css" rel="stylesheet" type="text/css" />
</head>

Or you may want to use a special character and something like this:

<!~~ this is some inner comment ~~>
help-info.de
  • 1,822
  • 5
  • 17
  • 19