BASIC HTML




Writing HTML

You can create an HTML document with any word pocessor or yext editor, including the very basic TeachText or Simple Text on the Mac and notepad or Wordpad for windows, both of which come free with the corresponding system software. Nevertheless, there are certain tools taht may help you create HTML document. These are discussed in Appendix A, HTML Tools.

HTML Tags

HTML tags are commands written between less than (<) and greater than (>) signs, also known as the angle brackets that indicate how the browser should display the text. There are opening and closing version for many tags, and the affected text is contain with in the two tags. Both the opening and closing tags use the same command word but the closing tag carries an initial extra forward slash symbol/.

Values

Attributes in turn often have values. In some cases, you must pick a value from a small group of choices. Other attributes are more strict about the type of values they accept. For example, the HSPACE attribute of the IMG tag will accept only integers as its value, and SRC attribute of the IMG tag will only accept URLs for its value.

Qoutation Marks

Generally speaking attributes that accept any value require that you enclose the value in straight quotation marks(") NOT curly ones(" "). It is good idea to use quotes around any URL to ensure that it is not misinterpreted by the server.

Nesting Tags

In some cases, you may want to modify your page contents with more than one tags. For example, you may want to add italic formating to a word inside a header. There are two things to keep in mind here. First, not all tags can contain all oher kinds of tags. In this book, each tag's des- cription details which other tags it may contain and which tags it may not. Second, orther is every thing. Whenever you use a closing tag it should corresond to the last unclosed opening tag. In other word, first A then B, then/B and then /A.

Absolute URLs

URLs can be either absolute or relative. An absolute URL show the entire path to the file, in- cluding the protocol, server name, the complete path and the filename itself. An absolute URLs is analogous to a complete street address, including name, street and number, city, state, zip code, and country. No matter where a letter is sent from, the post office will be able o find the recipient. In term of URLs this means that the location of the absolute URL itself as no bearing and the location of the actual file referenced- wether it is in a web page on your server or on mine, an absolute URl will look exactly the same. If your reference in a file from someone someone else's server , you'll have to use absolute URL. You will also need to use absolute URLs for FTP and Gopher sites and for new group and e-mail addresses- in short, an any kind of URLs that doesn't use an HTTP protocol.

Starting and finishing an HTML document

When a user jumps to the URL that correspond to your webpage, the browser needs information right away about what kind of document it is, and how it should be displayed. It gets information !DOCTYPE and HTML tag. The !DOCTYPE tags, is required for HTML 3.2 documents, identifies the version of HTML contain in the file so that browser know what to expect. The HTML tags identifies the file as HTML code so that it can be recognize by other application accross the Internet.

The Head and Body

The head section provides information about the URL of your webpage as well as its relaionship to the other pages at your site. The only element in the head section that is visible to the user is the title of the webpage.

Creating a Title

Each HTML page must have a title. A title should be short and descriptive. In some browser the title appears in the title bar of the windows; in other the tite is centered at the top of the screen. The title is used in the indexes as well as in browser history list and book marks.

To use the same color table for several new images:

      1. Create a new document in Photoshop.
      2. Select indexed Color in the Mode menu.
      3. In the dialog box that appears, choose 8 bits/pixel under Resolution, Adaptive under Palette and Diffusion 
         under Dither.
      4. Choose Color Table in the Mode menu
      5. In the color table dialog box , click the load the common color table.
      6. Choose the desired color  table in the Open dialog box that appears.
      7. Click Ok to close the Color Table dialog box
      8. Create the documents as usual.  Only the colors that you've loaded from the common color table will be 
         available.

Creating animated GIFs

The GIF89a format can contain several images at once which, when viewed with a browser that support animated GIFs are displayed on after another. You can use these features to create slide show all to approximate moving images. Perhaps the best tool for creating animated GIFs on the Macintosh in GIF builder, a freeware program develop by Yves Piguet.

To create an animated GIF

1. Create the series of images the will from the animated GIF. The images can be in Photoshop, PICT, or GIF format, among other. 2. Open GIF Builder. 3. Select al the images and drag them to the GIFBuilder window. The images will appear in Alphabetical order, by default. You can reorder them as necessary. 4. If desired, choose Start from the Animation menu to see a preview of your animated GIF. 5. If desired, choose Loop in the Options menu to determine if the animation should play once, more than or continuosly. 6. Add new images by choosing Add image in the File menu. 7. Once you are satisfied with your animated GIF, choose save in the File Menu. 8. In the save dialog box, give the animated GIF a name, preferably ending with the gif extension. The new conglomerated file looks just like a regular GIF.