<BR>tags, for example). Now we'll look at ways to control your text more closely, including such aspects as size, style, font and color.
|NOTE: It is being increasingly recommended that you control the appearance of your page with style sheets, and use HTML tags to describe the structure and content of your text. However, many browsers still in common use do not properly support style sheets, and in many cases you must still include HTML commands in your code as an alternative. This may be expected to change within the next year or two.|
</BIG>tags will display one size (whatever that means!) larger than the default size. Text between
</SMALL>tags will display one size smaller than the default size.
|WARNING: The default size of text (i.e., the size of text without any special sizing commands) is set by the user via the preference settings in their browser. Although you can override this, you shouldn't ever do it; the user may have very good reasons (such as video resolution, monitor size, or even visual disability) for choosing the setting they've established.|
</FONT>tags. One of the attributes of the
SIZE. You specify
SIZEas a positive or minus whole number. For example,
<FONT SIZE="2">means to display text two sizes larger than the default, and
<FONT SIZE="-3">means display text three sizes smaller than the default. Note that the actual difference between these various sizes is still not under your control and is determined by the individual browser.
SIZEattribute to specify the exact size in points, just as you do in a word processor, but you should never do this, for the same reason as not changing the default text size. 14 point text might look large to you, but it might be unreadably small to someone running at very high resolution or with a visual disability. (In fact, it might well be smaller than that user's default text size.) Many users will immediately click away from a page that is obviously overriding their own preferences for the default text size.
NOTE: Although you can use the heading tags (|
</U>tags, but quite frankly underlined text is considered pretty passé these days. Besides, it may confuse users who assume that underlined text is a link.
</STRONG>tags instead. Most commonly EMphasized text is rendered in italics and STRONG text in bold. However, this isn't required by the HTML standard, which means a browser could display these tags differently, so if what you really want is definitely bold or italics then use the
FACEattribute of the
<FONT>tag you can specify any typeface you want, such as Algerian, like this:
<FONT FACE="Algerian" SIZE="+2">Hi! I am displaying in Algerian</FONT>
FACEattribute, and the user's browser will display the selected text in the first of those fonts that it finds. For example, if we change our example to this:
<FONT FACE="Algerian, Times New Roman, Times, serif" SIZE="+2">Hi! I might be displaying in Algerian if you're lucky</FONT>
<FONT>tag. This time the attribute to use is
COLOR(duh). You specify color in the same way you specify a background color, using either a recognized keyword or a hexadecimal code. And the same warnings apply: don't use non-standard keywords, and if possible stick to Web-safe colors.
<FONT COLOR="PURPLE" SIZE="+1">Purple</FONT> and <FONT COLOR="#00CCCC" SIZE="+1">Turquoise</FONT> text.
|Terms to know from this lesson|
This page last updated 2/5/2010.|