HTML Tutorial - Chapter 4 Images
No page is a page without images, or graphics, Images give an entire light to a web page, not to mention setting the atmosphere for the page. Images are quite simple. Any image must be in either JPEG or GIF format. To put an image in a page, here is an example:
<html>
<head>
<title>Graphics!</title>
<body BACKGROUND="www.751com.cn">
<p>This page has graphics!
<p><img src="www.751com.cn">
<p><img src="www.751com.cn">
</body>
</html>
A few rules of images:
#1. When linking to ANY URL (such as www.751com.cn), you must ALWAYS have http:// unless the picture is in your web site server. If it is a local picture, (in your server account), the link can just be puppy.gif or kitty.jpg.
#2. The general primary formats for web graphics are GIF and JPG. Some browsers (like IE) might support things like BMP, and newer browsers have limited support for the PNG format, but to be sure, it's a safe bet to use GIF or JPG image files.
#3. Pictures can be formatted in a few ways. Two text tags can format a picture, <p> and <center>. If you want to start a picture on a new line, or center it, you can use <p> or <center> to do so. <img src> tag has a few options to change the size of a picture, if you wanted to make a thumbnail sized preview of a picture for example. The format is <img src="www.751com.cn"
height="pixelnumber" width="pixelnumber>.
#4. Pictures must be uploaded onto a server. Just because a picture is on your computer doesn't mean that everyone can see it. It has to be on a webserver, otherwise only you will be able to see it.
HTML Tutorial - Chapter 5 Linking Pages
If you want to have multiple pages, or want to link to a favorite site of yours, you must place a link in your page. A link is easy to do:
<a href="http://adress">Click here to go!</a>
Anything between the <a href> tag and the </a> tag becomes a link. When you click on a link, it takes you to the page. Here are some examples:
<p><a href="http://www.751com.cn">Yahoo!</a>
<p><a href="www.751com.cn/~mach8>Cool page!</a>
Note: In the address part of <a href>, the http:// is required unless you are linking to a page on your site. If you have a page called myhobbies.html in your web page directory, you can do something like <a href="hobbies.html">My Hobbies!</a>
The following will not work:
<a href="www.751com.cn">Yahoo?</a>
The same goes for linking pictures in chapter 4
You can make pictures link to sites as well:
<p><a href="http://www.somesite.com/apage.html"><img src="apicture.gif">
Some browsers automatically place a border around images that are links. To disable this, put border=0 in the tag.
HTML Tutorial - Chapter 6
Tables
Tables are effective in making graphical or text presentations look sharp. It can nicely organize a list of data. They form boxes around whatever you want and can split into smaller sections, called cells.
To start a table you begin with a tag, <table>. <table> declares a few things about the table. The things are defined by using them as options in the tag. For example,
<table width=4 height=3 cellspacing=4 cellpadding=5 border=3> In a table a cell is a square in the table that contains html code that is confined to that small square.
NOTE: The cell size is determined by whats in it. If you have "Hi!" the cell will be small. If you have the entire Constitution, it will be a tad bit longer.
Width declares how many cells wide the table is. Height declares how many cells tall the table is. Cellspacing is how much space is between cells, and cell padding is how thick the spacing is. Border is how wide the border is. Border=0 means no border.
Now you must make the cells. It's very easy. To start cells on a new row, you use the <tr> tag. To make a cell, use the <td> tag. After a row is done, you must </tr>. After a cell is done, you must </td> Rows/Cells should go with the height and width.
Example:
<html>
<head>
<title>Tables!</title>
</head>
<body BGCOLOR="black" text="white">
<table border=3 height=2 width=2>
<tr>
<td>Cell1</td>
<td>Cell2</td>
</tr>751com.cn
<tr>
<td>Cell3></td>
<td>Cell4</td>
</tr>
</table>
</body>
</html>
HTML Tutorial - Chapter 7
Forms and Buttons
Interactivity depends on... well... being able to interact and input. Enter forms and buttons. Forms and buttons allow you to put questionaires on your page, find out whose using it, and if you get really good and learn cgi, run programs on your page.
For now we'll do the basics because anything advanced would involve CGI – a totally different programming language requiring another tutorial... You don't want to get into that right now.
The initial tag is <form>. <Form> has somoe attributes that define what the form does. There are 2 attributes you will learn now. Action, and Method. To define an attribute, like any other tag, you use <form action="option" method=option>.Action is the address of what the form does. Mainly it is used for cgi, but there is another use for forms, and that is email comments. A form action can be sent to a mailto address just like in <a href>. So <form
action="mailto:pstein@nettaxi.com"> would send form information to that email. Method is whether the form is getting information or posting it. Get is only for CGI really, so all you need to put now is post. Before the </form>, you must use the <input> tag to put in the actual form data
that needs to be filled out. There are several kinds of form inputs.
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>