Site hosted by Angelfire.com: Build your free website today!

Leslie's HTML Guide

Leslie's HTML Guide
www.html4u.cjb.net

This guide is for the beginning or advanced webmaster. Here you will be able to find basic HTML and cool HTML tricks. Now, where would you like to begin?

Leslie's Basic HTML Guide
Leslie's Advanced HTML Guide

 

 

 

 

 

 

Leslie's Basic HTML Guide
Leslie's Basic HTML Guide

Contents of Leslie's Basic HTML Guide

The Basic HTML Page
     <html> and </html>
     <title> and </title>
     <head> and </head>
     <body> and </body>
Adding a Background Color or Image
     Adding a background color
     Adding a background image
     What I recommend for backgrounds
The Body of your HTML page
     Adding text
          Aligning text
          Different Fonts and Colors
          Linking text
     Adding images
          Adding a caption to your image
          Centering images
          Linking images
               How to get rid of the ugly blue border around linked image

An example of a page with a title, background, text, links, images, and linked images

 

 

I. The Basic HTML Page.
   The basic HTML page looks like this:

<HTML>
<title>Your title</title>
<head>
</head>
<body>
</body>
</HTML>

<HTML> marks the beginning of your HTML page. </HTML> marks the end of your HTML page.

The title of your page should be put between <title>and </title>. <title> and </title> should be placed in between <html> and<head>.This title will appear at the top of your browser's window. For example, on this page, the title is Leslie's HTML Guide. This should appear at the top of your browser's window. Check it out!

<head> and </head> goes between the title and the body. What goes between <head> and </head>? That's a simple answer. You can put a lot of things there. You can put roll-over text links, the "No right-click script", meta tags, or JavaScripts.

<body> and </body> goes between </head> and </html>. Between <body> and </body> is the actual page that can be seen. You can put text, images, etc.

2. Adding a background color or image.
    To add a background color, put this code in between <body and >:

bgcolor="the background color you want"

Replace what's in red with the basic color names (red, blue, aqua, lime, yellow, orange, hotpink, etc.) or with hex values for custom colors (#800080, #A8D3FF, #FF0000, #8000FF).

Here's an example of a page with a blue background.

<HTML>
<title>Your title</title>
<head>
</head>
<body bgcolor="blue">
</body>
</HTML>

     To add a background image, put this code between <body and >:

background="yourimage.gif"


Replace what's in red with the URL of your image. Here's an example of a page with one of my backgrounds from my site:

<HTML>
<title>Your title</title>
<head>
</head>
<body background="http://members.aol.com/lezly24/LinkBack.gif">
</body>
</HTML>

When adding a background image, you need to consider that sometimes, your server might not be able to open your background image. When this occurs, your background will become the default color of a person's browser. The default color is usually white or gray. To stay on the safe side when adding a background image, I recommend putting a background color and a background image so that if your server cannot open your background image, it will at least show the background color of your choice. Here's an example of a page with a background image and color:

<HTML>
<title>Your title</title>
<head>
</head>
<body bgcolor="blue"background="http://members.aol.com/lezly24/LinkBack.gif">
</body>
</HTML>

3. Making the body of your page.
    When making the body of your page, you need to remember hundreds of codes, but the most basic are adding text, adding links, adding images, and linking images.

     To add text, all you really need to do is type. BUT (yup there's always a "but") to align your text, you need another code.

     To align your text to the left, add this code:

<p align="left">Your text here.</p>

     To center your text:

<center>Your text here.</center>

     To put different fonts and colors, put this code.

<font face="Your font here" color="desired color">Your text here.</font>

     To link your text, put this code.

<a href="URL to go to">Your text here.</a>

     To link your text AND put a different font and color, use this code.

<a href="URL to go to"><font face="Your font here" color="desired color">Your text here.</font></a>

 

     A page is not complete with only text, links, and a background. You need graphics to enhance your site.
     To add an image, use this code.

<img src="yourimage.gif">

     Adding a caption to the image means this: When the visitor puts his/her mouse over the image, a caption will pop up. Webmasters normally put something like, "Click here!" or "Hi and welcome to my page!". To add a caption to your image, put this.

<img src="yourimage.gif" alt="Click here to go to my site!">

     To center your image, use this.

<center><img src="yourimage.gif" alt="Click here!"></center>

     To link an image, put this.

<a href="URL to go to"><img src="yourimage.gif" alt="Click here!"></a>

     To get rid of that ugly blue border, use this code.

<a href="URL to go to"><img src="yourimage.gif" alt="Click here!" border="0"></a>

     Here's an example of a page with a title, background, text, links, images, and linked images.

<html>

<head>
<title>Leslie's HTML Guide</title>
</head>

<body bgcolor="#A8D3FF" background="http://members.aol.com/lezly24/LinkBack.gif">
<font face=" Comic Sans MS" color="red" size="4">
<p align="center"><img src="http://members.aol.com/lezly24/logo.gif">

Hi and welcome to my page!<br>
<a href="http://www.beaniebabycrazy.com">Click here to go Beanie Baby Crazy.</a></font>

<a href="http://www.beaniebabycrazy.com"><img src="http://www.beaniebabycrazy.com/banner.gif" alt="Click here to go to Beanie Baby Crazy!" border="0" width="468" height="60"></a></p>
</body>
</html>

Now you've got the HTML basics! You are ready to go on to Leslie's Advanced HTML Guide.

 

 

 

 

 

 

 

Leslie's Advanced HTML Guide

Leslie's Advanced HTML Guide

Contents of Leslie's Advanced HTML Guide

Roll-over text links
No right-click Java Script
Frames
     Using AOL Press for Frames
     Using Microsoft FrontPage for Frames

 

 

1. Roll-over text links.
    You can put the roll-over text links script between the <head> and </head>. Roll-over text links are links like these.
     Beanie Baby Crazy
     Beanie Buddy Crazy

Notice that when you put your mouse over those two links, they turn pink and are underlined. When you click on them, they turn blue, italicized, and bold. This code only works in Microsoft Internet Explorer. Here is the code I used on this particular page. Put this code between the <head> and </head> of your HTML document.

<style><!--
A:link {color: purple; text-decoration: none}
A:visited {color: purple; text-decoration: none}
A:hover {color: hotpink; text-decoration: underline}
A:active {color: blue; text-decoration: underline; font-weight: bold; font-style: italic}
--></style>

You can modify this code by changing the colors and adding things. When you add things, make sure you have a semicolon (;) in between. Things you can add are:

font-style: italic
font-weight: bold
background-color: blue
text-decoration: underline
text-decoration: overline

You can experiment and modify this code to fit your site.

2. The "no right-click JavaScript".
    This script is normally used by webmasters who do not want others to copy their work. This disables the right mouse button, which disables the user to view or copy HTML or images. This works for both Netscape and Internet Explorer. Yes, there are other ways to copy HTML or images, but every little step to prevent "copy-cats" counts. Here's the code. Make sure to place it between the <head> and </head> of your HTML document.

<script language="JavaScript"> <!--
// No rightclick script v.2.5
// (c) 1998 barts1000
// barts1000@aol.com
// Don't delete this header!

var message="
Put your message here."; // Message for the alert box

// Don't edit below!

function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// --> </script>

Put your message in the space indicated. To make a linebreak, or <br>, just put \n. Here's an example:

<script language="JavaScript"> <!--
// No rightclick script v.2.5
// (c) 1998 barts1000
// barts1000@aol.com
// Don't delete this header!

var message="
Please don't copy!\nThanks and have a great day!"; // Message for the alert box

// Don't edit below!

function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// --> </script>

3. Frames
    There are many styles for a frames page. You can have 3 frames or 2, 4 frames or 5. It all depends. Below is the code for a frames page with a menu on the left and the main page on the right.
     Before putting this code, however, you must make two separate pages, the menu and the main page. This code will work best if you name your menu "menu.html" and your main page "main.html".
You must place the following code between the <head> and </head> of your "menu.html" page or your frames won't work.

<base target="main">

Now you are ready to make your frames page.

<html>

<head>
<title>
Your title here</title>
</head>

<frameset cols="150,*">
<frame name="contents" target="main" src="
menu.html">
<frame name="main" src="
main.html">
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>

Using AOLPress to create a frames page.
If you are an AOL member and have AOL Press, making a frames page is made easy. You can download AOL Press for FREE at AOL Keyword: AOL Press. Here's how to make a frames page with AOL Press.

1. Open AOL Press.

2. Go to File>New>New Frameset

3. Put your cursor over the red border. Notice that the arrow becomes an arrow thing.

4. Drag it wherever you want to put a frame or frames.

5. So now you have 2 or more frames.

6. Frames is simply defined as two or more pages being shown at the same time in the same window. For example, if you have two frames, like my site, you are actually seeing two separate pages.

7. Now all you have to do is design each frame.

8. To publish your page, follow these directions:

A. Click on the frame that you want to publish.

    1. On the top of the page, it says Location:

    2. Click in the box.

    3. Everything will be highlighted. Just press backspace and type the name of the frame. For example, if you are publishing the menu, the URL might be http://members.aol.com/yourAOLscreenname/menu.html and if you are publishing the main page, it might be http://members.aol.com/yourAOLscreenname/main.html To save the WHOLE page, click right between the two frames and a magenta border should appear around the whole page or frameset. Then type http://members.aol.com/yourAOLscreenname/index.html (so that your URL can be shortened to http://members.aol.com/yourAOLscreenname if you name it index, index can be taken out).

    4. Type the title you want in the space provided. For example, if you are publishing your menu, type Menu.

    5. Go to File>Save As

    6. A new window will open. Under page location, type

http://members.aol.com/yourAOLscreenname/index.html or http://members.aol.com/yourAOLscreenname/menu.html or http://members.aol.com/yourAOLscreenname/main.html.....whichever one applies.

    7. Click OK and it will publish.

 

Here are some problems that I encountered that can be solved in just a few easy steps:

1. The links on my menu don't open in the right frame. I have two frames. A menu and a main frame. I want the link on my menu to open in my main frame, not in the menu frame or a whole new window. What do I do?

Well, first you need to right click on an empty spot in your main frame, the frame where you want the page to show. Or you can go to Format>Frames>Frames Info. You will get a new window named Frames Info. In the Name field, type: main. Then click OK. On the menu frame, highlight the words that you want to link. Click the Link button (a chain under Element and next to Insert Image). A window named Link will appear. Under link to page, type the page that you want it to go to. Under Target Frame, type main. You are typing main because that's the frame where you want the links to show and that's what you named that frame.

Using Microsoft FrontPage to create a frames page.
If you have Microsoft FrontPage, making frames is even easier! Here are instructions based on Microsoft FrontPage 98 (also known as Microsoft FrontPage 3.0)

1. Open FrontPage.

2. Create a new web.

3. Open Microsoft FrontPage Editor or go to File>New>Page and double click the new page.

4. Go to File>New.

5. Click the Frames tab.

6. Select the frames page style you want.

7. Then, create your pages!

8. To save, click on the disk icon between Open and Print. Save each page and the frames page. You should be able to determine which page you are saving because there is a picture on the side. Whichever frame is highlighted green is the frame that is now being saved.

9. To publish to AOL, make sure to sign on under the screen name you are publishing to. Then, go to FrontPage Explorer (the place that shows all your files and pages) and go to File>Publish FrontPage Web...
     Then, a new window should open, entitled Publish. Click More Webs...
     Then type http://members.aol.com/
yourAOLscreenname in the space provided. Click OK. Another window will open, entitled Microsoft Web Publishing Wizard. Under FTP Server Name, type members.aol.com. Leave the Directory Path blank. Then click Next. Type anonymous as the User Name and type yourAOLscreenname@aol.com for the password. Then click Finish.
     Wait for it to publish and then check out your site!
     When you update your pages, update them and save them. Then to publish, all you need to do now, since you already set up your Publishing Wizard, is press the Publish button, located next to the New Page button and the Open button.

 

That's all for Leslie's HTML Guide! If you have any HTML-related questions, e-mail me at Leslie@beaniebabycrazy.com or webmaster@beaniebabycrazy.com. I will either answer it here or through e-mail, so check this site often for more codes and HTML help!

 

Click here to go to my main page, Beanie Baby Crazy at www.beaniebabycrazy.com!