NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

HTML XHTML The Complete Reference
home » reference » appendix b » miscellaneous css constructs

Miscellaneous CSS Constructs


This section discusses some miscellaneous constructs associated with style sheets.

/* comments */


Comments can be placed within style sheets. HTML comment syntax (<!-- comment -->) does not apply. However, HTML comments are often used to mask style blocks. Style sheets use the comment syntax used in C programming (/*comment*/).

Example


<style type="text/css">
p {font-face: Courier; font-size: 14pt; font-weight: bold; background-color: yellow;}
/*This style sheet was created at Demo Company, Inc.
All rights reserved.*/
</style>

! Important


This property specifies that a style takes precedence over any different, conflicting styles. A style specified as important by an author takes precedence over a rule set by an end user. This construct should be used sparingly.

Example


div {font-size: 14pt; line-height: 150%; font-family: Arial ! important;}

(X)HTML Elements
CSS Properties
Back: CSS Selectors Next: CSS1 / CSS2 Properties
< Home | About | Chapters | Examples | Errata | Reference | Site Map >