HTML and CSS Reference
In-Depth Information
Comments are also useful for temporarily deactivating declarations or entire style
rules for testing purposes.
p { /* color: white; */ }
Whitespace refers to spaces, tabs, and new lines. You are free to format your style sheets
however you like with whitespace to make them easier to read. One common formatting
convention is to split declarations across multiple lines.
.fruit {
color: red;
margin: 1px;
Another popular convention is to keep a rule's declarations in a single line and split
the declarations into multiple lines only when they become too numerous.
.fruit { color: red; margin: 1px; } { color: green; margin: 2px; }
The formatting you use is a matter of preference. Choose the one that makes sense to
you and aim to keep it consistent.
Search WWH ::

Custom Search