HTML and CSS Reference
In-Depth Information
Figure 7.6 shows how they appear in a browser.
.
Output
FIGURE 7.6
An example of how
horizontal rules
are used around a
list.
Attributes of the <hr> Tag
There are a number of attributes that can be used to modify the appearance of a horizon-
tal rule. Although they work in current browsers, they have been removed from HTML5,
and you should use CSS instead. The size attribute indicates the thickness, in pixels, of
the rule line. The default is 2 , and this also is the smallest that you can make the rule
line. Figure 7.7 shows the sample rule line thicknesses created with the following code:
Input
< h2 >2 Pixels </h2>
<hr size=”2” />
< h2 >4 Pixels </h2>
<hr size=”4” />
< h2 >8 Pixels </h2>
<hr size=”8” />
< h2 >16 Pixels </h2>
<hr size=”16” />
.
Output
FIGURE 7.7
Examples of rule
line thicknesses.
7
 
 
Search WWH ::




Custom Search