Cut the Comments

Comments within style sheets start with /* and end with */ . They can be useful for documenting more complex style sheets but should be minimized or eliminated on high-traffic pages. Here's a verbose example:

 h1 {color:purple} /* first-level headers are the color purple */ 

In HTML, CSS also allows SGML comments ( <!--...--> ) to hide style sheets from pre-HTML 3.2 user agents . However, XHTML can strip SGML comments within style or script elements because the data type changed to the more restrictive #PCDATA. You can either use conditional SSI to include embedded styles within XHTML documents, or you can ignore these ancient browsers.


Speed Up Your Site[c] Web Site Optimization
Speed Up Your Site[c] Web Site Optimization
ISBN: 596515081
Year: 2005
Pages: 135 © 2008-2017.
If you may any questions please contact us: