Why is there often a <! -
Possible duplicate:
What is the use of comment notation in a style tag?
I was wondering that often when writing css code inside an html document there is <!-- right after the style tag. So, for example: <style type="text/css"><!-- body { text-align: center; } --></style> <style type="text/css"><!-- body { text-align: center; } --></style>
As far as I know, this is an html comment, but why is it placed inside a style tag, what's the point? Exclude some browsers that will see this as a comment?
This is an HTML comment that ensures that the browser will not interpret the CSS in the style element as displayable HTML.
It is mainly used for (very) old browsers that donβt support CSS at all or donβt know that they ignore the content inside the element.
This was also usually done with inline javascript.