Notes to "Introduction to Web Design | Sizing Text"
1.
Note that heading tags embed a line
break and can take an
optional alignment
parameter of LEFT, RIGHT,
or CENTER
w3c
Align : deprecated
Deprecated Example:
<H1 align="center">Heading</H1>
CSS Example:
<HEAD><TITLE>How to Align Headings</TITLE>
<STYLE type="text/css">
H1 { text-align: center}
</STYLE>
<BODY>
<H1> How to Align Headings </H1>
The above example will center all H1
declarations. If you wish to align only certain
H1 declarations you can set the class attribute
on the element.
<HEAD>
<TITLE>How to Center Certain Headings</TITLE>
<STYLE type="text/css">
H1.special {text-align: center}
</STYLE>
<BODY>
<H1 class="special"> How to Center Certain Headings </H1>
2.
You may specify an absolute
height such as <FONT SIZE= "4">
or you may specify a size relative
to the basefont using the increment
notation such as <FONT SIZE = "+2">.
W3C
FONT and BASEFONT are deprecated in favor of style sheets.
Deprecated Example:
<FONT SIZE="+2">text</FONT> (size relative to base font)
<FONT SIZE="2">text</FONT> (absolute size)
CSS Example:
P { font-size: 12pt; }
EM { font-size: 150% }
EM { font-size: 1.5em }
BLOCKQUOTE { font-size: larger }
Or, specify colors, and style in CSS
<HEAD>
<STYLE type="text/css">
P.mypar {font-style: italic; color: blue}
</STYLE>
</HEAD>
<P id="mypar"> Your fancy paragraph here
3.
W3C
Although <BIG> and <SMALL> are not deprecated, their use is
discouraged in favor of style sheets.
Return to "Introduction to Web Design | Sizing Text"
|