Subject: | html() method not suitable for XHTML output |
A compliant browser in standards compliance mode will strictly ignore anything within comments in any XML source, including XHTML files, so surrounding the stylesheet with <!-- --> inside the <style></style> tags makes the stylesheet invisible.
Commenting out the stylesheet is a trick once conceived to prevent browsers which were not aware of the "style" element in HTML from displaying the content of a stylesheet as page text. Such browsers have long sinced vanished.
It is however strongly suggested to surround put the stylesheet in a CDATA section in XHTML files so that ampersands and angle brackets inside the stylesheet need not be quoted. (An occasional source of errors is to refer to a URL with ampersands in it from the stylesheet.) The common way to do this is to put "/* <![CDATA[ */" in front and "/* ]]> */" after the stylesheet inside the <style> tags.