html comments in css?

Justin

New member
Recently for a website, I had used the code for a floating background, and I had used a css script that is

<style type="text/css">
<!--
body {
background-attachment: fixed;
background-image: url(pagebgfloat.gif);
background-repeat: no-repeat;
background-position: right top;
}
-->
</style>

and it worked and I was happy, but I began to wonder, what exactly do the " <!-- --> " things mean? And how does it work out? I know that it is the html comment thing, but then how does it work with the script?
 
The comment tags are not necessary, I'm not sure why they were included in the first place, perhaps as a way of preventing older browsers from trying to read the CSS as HTML.
 
Back
Top