1AFM.com basic HTML Tutorial | |
|
Home
Back to:
|
Basic HTML Tutorial - How to make hyperlinks, link to images and call them up, and make pages open in new windows.By Ken J Wagner © 2002a - linking is the most important thing we do on the web. Hyperlinks begin with the a (anchor) tag, which must be closed /a. href - this stands for hyperlink reference and tells the browser what page to call up when the link is clicked on. Here's an example with code:
target - a target tag on a hyperlink makes it open in a new window ( target="_blank" ) or break out of frames ( target="_top" ). Here's what the code looks like: There are different ways to make hyperlinks. To link to another site the a href tag must include the http:// and full URL as seen above. But when linking from one page on a web site to another page on the same web site the http:// and full URL are not required. If you're linking a page to another page in the same directory it only needs to look like this: If you're linking to a page in another directory on the same site it can be like this: To make links jump on the same page you create a names and a href="#" like this: .gif and .jpg - since it's been brought up, let's cover it now. .gif and .jpg are image files. You can upload an image to your site and then call it up to appear on your page. Here's an example:
![]()
Here's the code:
Note that I put a width, height and border attribute. If you don't put border="0" in image tags a big blue border will appear around the image. Here are the attributes for images (none of these need to be closed): img - this sets up the image. src - this tells the browser where to pull up the image from. alt - this is the alternate text you want to appear should the image happen to not load, so people will know what it would have been.
Now let's hyperlink an image. ![]() Here's the code: To center images you can put them in a table with a div align tag, use a div align tag without a table (be sure to close it /div align ) or just use a center tag (be sure to close it /center ).
This tutorial was created in its entirety by Ken J Wagner © 2002 All Rights Reserved. |
|
Site template by Ken J Wagner 1AFM.com © 2002 | |