Notes to "Introduction to Web Design | Basic HTML Body Tags "
1
<P> Indicates a new paragraph and
instructs the browser to add a
blank line. Takes optional
alignment parameters of LEFT,
RIGHT or CENTER to align the
paragraph.
W3C
align has been deprecated in favor of Style Sheets.
Deprecated Example:
<P align="right">A paragraph covering several lines...
CSS Example:
<HEAD><TITLE>How to Right Align Text</TITLE>
<STYLE type="text/css">
P.mypar {text-align: right}
</STYLE>
<BODY>
<P class="mypar">A paragraph covering several lines...
CSS Example of right aligning a series of paragraphs by
grouping them with the DIV element:
<DIV align="right">
<P>...This is the first paragraph...
<P>...This is the second paragraph...
<P>...This is the third paragraph...
</DIV>
Or, since the text-align property is inherited from the parent
element in CSS, you can use:
<HEAD><TITLE>How to Align Text</TITLE>
<STYLE type="text/css">
DIV.mypars {text-align: right}
</STYLE>
<BODY>
<DIV class="mypars">
<P>...This is the first paragraph...
<P>...This is the second paragraph...
<P>...This is the third paragraph...
</DIV>
Finally, to center the entire document with CSS:
<HEAD><TITLE>How to Align the Entire Document</TITLE>
<STYLE type="text/css">
BODY {text-align: center}
</STYLE>
<BODY>
The body of the entire document is centered...
</BODY>
2
<HR> - This tag creates a horizontal line
across the screen. By default the
line will span the entire width of
the document according to the
specifications of BLOCKQUOTE
and LIST tags. However, you can
modify the look of the line by
using any of the following
attributes. ALIGN may equal
LEFT, RIGHT, or CENTER. SIZE
may equal some pixel value.
WIDTH may equal some pixel
value or some percentage of the
document width. NOSHADE will
turn off the beveling look. COLOR
may equal some color hexvalue.
W3C
align : deprecated
noshade: deprecated
size=length: deprecated
width=length deprecated
color: is not specified as an attribute of <HR>
Return to "Introduction to Web Design | Basic HTML Body Tags "
|