Homepage

HTML lessons


Explaining simple tags
Explaining simple tags2
Explaining simple tags3
Browsers and Notepad
Playing with Fonts
Colors and Tags
Learning to Link
Inching through Images
Inching a Bit More with Images
Terrific Tables to Try
Building Borders
Wrapping Text
Terrific Tables Two
Color
Pat's Web Page
Making Lists Long and Short
The Mail Command
Basic Frames
Making Forms
Making More Forms
Making Buttons One
Making Buttons Two
IFrames
Appendix

Playing with Fonts

There are several tags used to display different properties for fonts. The basic ones are:

  1. <I> </I> This is used for italics.
  2. <B> </B> This is used for bold.

Font sizes are a little different in HTML. They are specified in seven different sizes, not similar to the fonts in MS WORD. Each size is specified by assigning a number to the font. The language is thus: basefont=7 or whatever number chosen. The default size most browsers use is 4.
Here are samples of each size.


  • This is size seven.
    The code looks like this:
    <basefont size=7> This is size seven. </font>
  • This is size six. The code looks like this:
    <basefont size=6> This is size six. </font>
  • This is size five. The code looks like this:
    <basefont size=5> This is size five. </font>
  • This is size four. The code looks like this:
    <basefont size=4> This is size four. </font>
  • This is size three. The code looks like this:
    <basefont size=3> This is size three. </font>
  • This is size two. The code looks like this:
    <basefont size=2> This is size two. </font>
  • This is size one. The code looks like this:
    <basefont size=1> This is size one. </font>

Help!
Help!
I
am
getting
so
small.
Aww! It is good to be back to normal.

There is another way change size. As I mentioned the size is usually four by default. <Font size=+2> </font> This command will increase font size automatically by two. Or I could just write code asking the font size to be six. Similarly a minus sign can be used to decrease font size.

Before we finish, I should cover font color. It is a tag handled just like font size. There are 216 colors to choose from that are web-friendly. <font color="#0066FF"> </font> This is blue (I hope, as I am a bit colorblind).

Can you figure out how to make this sentence?
The key is below, but try it first and see how close you can come before you look. Feel free to change the sentence to look a little different. After all, it still is a free country!


<font size=7>C</font>an you figure <font color="#0066ff">out</font> <i>how</i> to make this <b>sentence</b><font size=6>?</font>

Congratulations! You are well on your way to "proficiency" at writing hard code. In computerland, when you become good at code, you are nicknamed a "codeslinger".