Contents |
|
|
|
Organizing an HTML File |
|||||||||
|---|---|---|---|---|---|---|---|---|---|
Main Parts |
Each HTML file begins with a tag that identifies it as an HTML file. The simplest and most common tag is the HTML tag, with the /HTML tag to balance it at the end of the document. At any point in a document, you may put comment tags. These are (mainly) ignored by the browser, and not displayed or printed. They are just for the benefit of our fellow HTML coders! Example:
Every well-formed HTML file consists of two parts: the head and the body. Let's look at each... |
||||||||
The Head |
The head is the first part of the file. (Duh...) It's purpose is to give information about the document as a whole, and none of it shows in the main browser window. Here are some things that go in the head:
Here is a page with its head and a title defined:
|
||||||||
The Body |
The body is the part of the Web page we see. Until we put text in the body, our readers will have nothing to read!
Here's what the browser would display:
Not much to look at, but it's a good start!
|
||||||||
HTML Flexibility |
To understand how HTML works, it's important to understand what it's for. It was developed by Tim Berners-Lee and the European Particle Physics Laboratory (CERN) in Geneva, Switzerland, to provide a way for scientists to share their research results quickly and easily using the Internet. Because the Internet can connect with many kinds of computers and many kinds of display systems, HTML had to be very flexible. Browsers are therefore given the responsibility to adapt an HTML file as best they can to the computer, the display, and window in which it is running. This could be high or low resolution, many-colored or color-challenged, long and narrow, short and wide, large or small. To make this work, there are several principles employed:
Here is an example illustrating this flexibility:
The result of these principles is that HTML seems to give more control to the browser than to the HTML designer. This can lead to frustrated designers, but it is (at least partly) responsible for the explosive growth of the World Wide Web. |
||||||||
About this document... |
|
|---|---|
Audience: |
This is for people who know the basic concepts of the World Wide Web and Web pages, and want to know how HTML works. |
Objectives: |
When you successfully complete this lesson, you will be able to...
|
Module W22c: |
This document is part of a modular instruction series in Computer Information Systems. For more information, see the overview or the list of modules in this series, W: World Wide Web. This document has been used in the following classes: INP 165, Basic HTML; INP 140, Building a Web Site. |
Author: |
Laurence J. Krieg |
Institution: |
|
History: |
Original: 19 Oct 2000
Last modification: Thursday, 09-Sep-2004 11:17:19 EDT |
Copyright: |
Copyright © 2000-2004,
Laurence J. Krieg, Washtenaw Community College. Instructors: You may point to this file in your Web-based materials. Students: you may make a copy for your personal use. All other uses: contact the author, Laurence J. Krieg for permission. Email krieg@ieee.org |