HTML and CSS Reference
In-Depth Information
EXAMPLE 14.8 ( CONTINUED )
h1{ /* grouping properties */
font-weight: bold;
font-size: 30pt;
font-family: verdana;
}
h2 { /* grouping a property's values */
4
border-style:dotted; border-color:purple;
font: bold 24pt arial
}
</style>
</head>
<body bgcolor=silver>
<h1>Crossing the Border!</h1>
<h2>Welcome!</h2>
<h3>Nice country.</h3>
</body>
</html>
EXPLANATION
1
The margins and borders are defined for the body of this document.
2
The margin bottom is 1 centimeter up from the bottom of the document and 2 cen-
timeters in from the left. There will be more whitespace around the headings, para-
graphs, and other elements within the body because of the increased margin sizes.
3
A thick, multicolored border is placed on the inside of the margin.
4
The border style for h2 elements is purple dots. See Figure 14.10.
Figure 14.10 Playing with margins and borders. This is how the colorful border
appears in Opera. (The border looks different in Internet Explorer 6: It surrounds the
entire window.)
 
Search WWH ::




Custom Search