Possible Duplicate:
What is the usage of comment notations in style tag?
I was wondering that often when writing css code inside a html document there is <!-- just behind the style tag. So for example: <style type="text/css"><!--
body { text-align: center; } --></style>
In my knowledge this is a html comment but why is it put inside the style tag, whats the sense? Is it to exclude certain browsers which will see it as a comment?
It is an HTML comment ensuring a browser will not interpret the CSS within the
styleelement as HTML to display.Mostly used for (very) old browsers that did not support CSS at all or did not know it ignore the content within the element.
This was also commonly done with inline javascript.