I hope you are excited to be learning html. By now, you're probably realizing that the time and effort you spend actually learning to write html is a much better investment than time and effort spent learning a beginner's web page publisher. You're not "learning how to make a web page" with one of those, anymore than you would be "learning how to make pastry" by toasting a pop-tart!
At the end of HTML Lesson 1 , we learned how to create and upload a simple web page that looked similar to this:
My First Web Page - Microsoft Internet Explorer
_____________________________________________________________Welcome to my first web page. I am thrilled to be learning html.
There are many sites on the web where graphics, animations, and background images are offered. Some may place a limitation on the images' use, some may ask for a credit or a link back to their page if you use one of their graphics, and some are offered free for the taking. You should NEVER steal graphics off of someone's web site if they are not being offered for your use. That having been said, we're going to learn the procedure for copying graphics for you to use on your web page.
Go to the Internet to Get a Picture – 5 minutes
Open Internet Explorer
Search for a picture using a search engine such as Google
When you find a picture you may want for your webpage place your mouse directly over the image " and right-click.
From the pop-up menu, click "save picture as". You'll get a save window.
Use the drop-down menu arrow in the "save in" field box to locate your webpage folder on your hard drive. (C --> webpage)
Confirm that the "File name" field reads: samplepic, and the "Save as type" field reads: GIF(*.gif)
Note: Even if you are already familiar with copying graphics, the important point here is to always save graphics that you plan to use on your web page to the same folder where your html page is. Then you will be able to use just the file name on your html pages (as we did in Step 7 of HTMLLesson1), and you will not need to include path or address names.
Ok, let's do another one: You're going to need a background image to complete SKILL 2, so go to http://www.members.aol.com/webstlouis/howto2.html and scroll down and save the blue background image shown on the right to your webpage folder, using the same 5 steps from before. Note that this is a .jpg, not a .gif. Make sure you have the correct extension (.jpg) in the "Save as type" field before you click "save".
Skill 2: Add a Background Color or Image to Your Web Page
The <body> tag in your html document is where you can add "instructions" that affect the appearance of the whole page. Two such elements are background color (bgcolor=) and background image (background=).
Colors in html-land are converted to their hexidecimal values. Your browser will also recognize the names of about 140 colors as plain words. At the end of this lesson, I will give you some links to hexidecimal and literal-word color resources, but here's a few we can play with for right now:
Skill 2: Add a Background Color or Image to Your Web Page (cont’d)
Plain Word white black red blue yellow aqua orange palegreen
We're going to change the background color of your web page to aqua:
Open your local (off-line) copy by double-clicking on the index.html file in your webpage folder. It will open in MIE.
Right-click in an open space on the browser page and select "view source" from the pop-up menu. “index.html-Notepad" will open.
In the notepad document, find your existing <body> tag near the top of the document, and change it to read as follows:
Save notepad, (File--> Save) and refresh MIE. The background should now be aqua.
Try changing the bgcolor= tag to several other colors and view the results. Use either the plain words, or the hexidecimal values between the quotation marks in the tag. Don't forget to save and refresh with each change
Poor Quackers. Did you try black? Did you say "Hey! Where did my words go!?" Don't be embarrased, I said that the first time too! Of course, you can't see black words on a black background! We'll be learning to alter font color in SKILL 3. But first, let's learn the body tag element for using a background image:
In the notepad document, change the <body> tag to read as follows:
Save notepad and refresh MIE. The background image you saved to your webpage folder in SKILL 1 should now be visible as the background of the page, provided you saved it with the same name as shown above.
Skill 3: Changing the Style, Size and Color of the Font
We're going to learn another new tag: <font>
Open and close font tags allows you to give instructions to your browser that will affect the appearance of the text between the tags. Within the font tag, you can specify elements to change the type of font, it's color, or size.
Let's change the color and size of text on your page now, by adding a font tag with color and size attributes:
In your index.html-notepad document, place your cursor directly before the word "Welcome", and hit enter.
Type the bold, blue items, before and after your text, exactly as shown: <font color="FF5500" size="+2"> Welcome to my first web page.<br>I am thrilled to be learning html. </font>
Save notepad (File -->Save) then switch to your browser window and refresh. (I'll be calling this sequence "save/refresh" from now on, ok?)
Your text should now be orange and larger, similar to this:
Welcome to my first web page. I am thrilled to be learning html.
Try a few other size and color combinations on your own. You can also use negative numbers (size="-1", size="-2") to specify smaller font sizes. Don't forget to save/refresh after each change.
Next we're going to learn how to change the font itself, by adding another attribute to the font tag. This attribute is called "face".
In your index.html-notepad document, change your font tag to read as follows:
<font face="comic sans ms" color="navy" size="+1"> Welcome to my first web page.<br>I am thrilled to be learning html. </font>
After you save/refresh, your text should look like this:
Welcome to my first web page. I am thrilled to be learning html.
Note: For the font you choose to display properly to another person visiting your page, they must have the font you named on their OWN computer. So don't pick a font that no one else is likely to have. You can list more than one font in your tag, like this: face="arial, tahoma, helvetica" and the visitor's web browser will just go down the list until it finds a font that is on their computer. If you are just determined to use an unusual font on your page, you can type the text in the font of your choice in a graphics editing software program like Paint Shop Pro , save it as a .gif file to your webpage folder, and then insert it into your document using the image source tag, like this:
You wouldn't want to do that for the whole page or large sections of text, however, as the image file size would be very large, and would slow the loading of your page considerably.
Skill 4: Creating Headings, Lines, and Bold, Italicized, or Underlined Text
Now we’ll create a horizontal rule. It will appear anyplace you type: <HR> in your notepad document. It does not require closing.
Bold, italics, and underline require open and close tags. Simply place the tags at the beginning and end of the text you want affected:
<b> Bold </b> <i> Italics </i> <u> Underline </u>
Skill 4: Creating Headings, Lines, and Bold, Italicized, or Underlined Text (continued)
The heading tag is used to enlarge text, such as you might for a title or a heading. It requires an open and a close tag. There are 6 sizes of headings, h1 through h6, with h1 being the biggest (go figure). Unlike the font size tag, the heading tag forces horizontal space above and below the text to which you apply the tag.
Ok, we're going to try all of the above: In your notepad document, let's choose a different font, add a heading tag around the word "Welcome", and then add the other bold, blue text-effect tags as shown:
<center> <font face="arial" color="navy" size="+1"> <H1> Welcome </H1> <HR> to my <b> first </b> web page.<br> I am <i> thrilled </i> to be learning <u> html. </u> </font> </center>
Save/refresh. In your browser, you should now see this:
We're going to turn the words CLICK HERE into a link to your second page using the anchor tag. Within the open-anchor tag, we will add an attribute (HREF=) to tell your browser where the link should point. Add the bold blue text, exactly as shown to the CLICK HERE sentence in your index.html-notepad document:
<A HREF="page2.html"> CLICK HERE </A> to go to my second page.
As shown above, you only need the file name, and not the page's complete URL, if the html page you are linking to is uploaded to the same directory where your index.html page is.
Save/Refresh. Did "CLICK HERE" turn into a link? Click on it - there's your second page!
Right click and select "View Source" on your second page, and add the following tags and text to your page2.html-notepad document:
<A HREF="index.html">RETURN TO HOME PAGE </A>
Save/Refresh. Now you have a link leading back!
Note: If you want to use an IMAGE as a link, place the anchor tag around the image tag, like this: <A HREF="page2.html"> <img src="quackers.gif"> </A> If you use an image as a link, and you don't want a link-colored border around your image, you need to add "border=0" to the image tag. The complete tag would look like this: <A HREF="page2.html"> <img src="quackers.gif" border=0> </A> For linking to other pages on the web, place the complete URL address of the page you want to link to between the quotation marks following the HREF attribute. For example, if you wanted to link to the class page, the tag would be: <A HREF="http://www.geocities.com/c525600/">Wow, this woman's a genius!</A>
Now that you know how to make links, the e-mail tag is a cinch. The e-mail tag is just a variation of the anchor tag. You'll write it like this: <A HREF="mailto:youremailaddress"> text or image here </A>
If your email address contains spaces, you must remove them and type your address as one word (all lower case) for the email link to work. When the text or image link is clicked on, an e-mail form addressed to you will automatically open.
Tables are a complicated subject, and pretty advanced for a beginner's html lesson, but sooner or later you're going to get tired of placing all your text and images in a long vertical row down your page, and you'll yearn to place text ALONGSIDE an image. That requires a table.
Let's learn another new tag, <table></table>, and its basic attributes, and then we'll use this new tag to create a simple table that will place text alongside an image.
A table consists of rows of cells. A cell is a container for information. You can place text, images, links, background color, other tables, or any of the other tags we've learned, inside a table cell.
<table> - Begins a table <tr> - begins a new row in the table <td> - begins a cell in the row. </td> - ends a cell in a row (You can put as many cells as you want in a row.) </tr> - marks the end of a row. (You can put as many rows as you want in a table.) </table> - Ends the table
Return to your index.html-notepad document. We're going to delete all of those text-effect tags (if you haven't already on your own), and then use a table to place Quackers alongside the text on the page: While we're at it, we'll add an e-mail link, too.
Edit your page to read as follows:
<html> <head> <title>My First Web Page </title> </head> <body background=“bg-water.jpg”> <center> <table> <tr> <td> <img src=“quackers.gif”></td> <td><font color=“darkorange” size=“+1”. Welcome to my first web page.<br> I am thrilled to be learning html. </font></td> </tr> </table> </center> <br> <br> <A HREF=“page2.html” CLICK HERE</A> to go to my second page <A HREF= mailto:youremailaddress >E-MAIL ME!</A> </body> </html>
If you've completed Lessons 1 and 2, you've got the skills you need to start your personal web page. Let the creativity begin! There's a lot more to learn about html when you are ready. In fact, there's a lot more to learn about the tags I've taught you! These tutorials were meant to get you started, and I hope they've done that to your satisfaction.
When you're ready to learn a lot more fun stuff, check out HTMLLesson3