HTML and CSS Reference
In-Depth Information
Finally, in most current browsers, the noshade attribute shown in the following example
causes the browser to draw the rule line as a plain line without the three-dimensional
shading, as shown in Figure 7.9.
Handling Attributes Without Values
In HTML 4.01 and, more recently, HTML5, a value isn't required by the noshade
attribute. The method you use to apply this attribute appears as follows:
<hr align=”center” size=”4” width=”200” noshade>
To comply with XHTML 1.0, however, all attributes require a value. The HTML 4.01
specification requires that Boolean attributes (such as noshade ) have only the name
of the attribute itself as the value. The following example demonstrates how to apply
the noshade attribute to the <hr> tag in compliance with the XHTML 1.0 specifica-
tion. To comply with HTML5, you would drop all of the attributes and use CSS
instead. (The noshade attribute can be duplicated by changing the borders and back-
ground of the horizontal rule.)
<hr align=”center” size=”4” width=”200” noshade=”noshade” />
<hr align=”center” size=”4” width=”300” noshade=”noshade” />
<hr align=”center” size=”4” width=”400” noshade=”noshade” />
<h1 align=”center”>NorthWestern Video</h1>
<hr align=”center” size=”4” width=”400” noshade=”noshade” />
<hr align=”center” size=”4” width=”300” noshade=”noshade” />
<hr align=”center” size=”4” width=”200” noshade=”noshade” />
<h2 align=”center”>Presents</h2>
Rule lines without
Line Break
The <br> tag breaks a line of text at the point where it appears. When a web browser
encounters a <br> tag, it restarts the text after the tag at the left margin (whatever the
current left margin happens to be for the current element). You can use <br> within other
elements, such as paragraphs or list items; <br> won't add extra space above or below
the new line or change the font or style of the current entity. All it does is restart the text
at the next line.
Search WWH ::

Custom Search