If you can't see different types of fonts on this page, then your browser doesn't have the capability. It will work, though, in Netscape 3 for both Macintosh and Windows95. It also works in later versions of Explorer.
NOTE: If you're on a Windows machine, some examples given appear differently than intended due to Windows fonts. Also, if you're using Explorer 2 for Mac, your default font will not show up correctly.
<font size=4><i>Hello</i></font>
Hello
<font size=4><b><i>Hello</i></b></font>
Hello
<font face="geneva, arial, sans serif" size=+1>This is geneva or arial</font>
This is geneva or arial
Note that you cannot specify just any font; the number is limited, and the person viewing the page has to have at least one of the general fonts on their computer. For this reason, basic system fonts for both Macintosh and Windows should be given. You can name up to three fonts; the first font named is the one which appears if it is in the user's system, and if it isn't, the next one is used. Examples are given below; the code is given in red, and an example follows immediately below it. Note, too, that sizes can be given from -2 to +4 ; a value of zero means the default size that the viewer has chosen in their browser options. You can also choose to name the size using numbers from 1 to 7.
In the next two examples, notice that the order of fonts listed is only important if the viewer has those fonts; Windows95 users will see the first two examples as identical.
<font face="helvetica, geneva, sans serif" size=4>This is helvetica or geneva (or some other sans serif font on Windows)</font>
This is helvetica or geneva (or some other sans serif font on Windows)
<font face="arial black, monaco, chicago" size=4>This is arial black, monaco, or chicago</font>
This is arial black, monaco, or chicago
<font face="times, times new roman, serif" size=4>This is times or times new roman</font>
This is times or times new roman
<font face="arial, helvetica, sans serif" size=+1>This is arial or helvetica</font>
This is arial or helvetica
<font face="palatino, times, times new roman" size=+1>This is palatino, times, or times new roman</font>
This is palatino, times, or times new roman
<font face="courier, bookman" size=+1>This is courier or bookman</font>
This is courier or bookman
<font face="comic sans MS, new york, times" size=+1>This is Comic Sans MS, New York, or Times.</font>
This is Comic Sans MS, New York, or Times.
Most people, though, using Netscape have default fonts set as Times or another serif font, which looks like this:
This is times, SMALL SIZE
New York, size 7
This is arial or geneva, size 7
This is helvetica or geneva, size +4
This is bold times, size +3
This is bold times, size +4
This is bold bookman, size +3
This is bold arial or geneva, size +3
This is bold arial or geneva, size +4
This is bold helvetica or geneva, size +3
This is bold courier, size +3
That's the end of this quick tips sheet on specifing font sizes with html. I hope you found it useful.
| back to HTML Tips Articles Index |
Bill Pellowe |