BcK BcK - 1 month ago 7
CSS Question

HTML -- the line after a comment

<head>
<style type="text/css">
<!-- comment -->
h2 {color:#34DE56;}
p {text-indent:25px;}
</style>
</head>





<head>
<style type="text/css">
h2 {color:#34DE56;}
p {text-indent:25px;}
</style>
</head>


Hey everyone I know this may be the most basic question about html but I couldn't find the reason behind it.

Upper code contains a comment. When I put this comment before any line, the following line does not get read. The rest works alright.

Basically the colouring part does not work when I put a comment in the previous line. When I delete the comment it works just the way it's supposed to.

Answer

For css use:

/* Comment */

For html use:

<!-- Comment -->
Comments