Zen

Intro
Browser
Page
Tags
Elements
Tables
Layout
Perfection


Homesite 101


The Zen of the Page

Let's continue our meditations by examining the basic structure of the page.

Every HTML page begins with a statement <HTML> that signals the browser "I'm beginning an HTML page," and ends with </HTML> that tells it "OK, I'm finished now." What you've really done is create an HTML container, and everything inside that container is meant to be displayed as a web page.

A web page has two basic parts - a head, and a body. Each of these also is a container and, as you might imagine, the head sits on top. Each of these containers is opened and closed just like the page container was: <HEAD> opens the head, and </HEAD> closes it; <BODY> opens the body, and </BODY> closes it. And that, Grasshopper, is all there is to your basic web page.

You can have a functional web page without anything inside the head (reminds me of some people I know). Usually, though, it contains a title that displays either on the bar at the bottom of the screen (on WebTV) or in the top of the browser (computers). The title is inside a title container, which is inside the head container. Here's the code for the head and title containers of the page you're reading now:

    <HEAD> <TITLE>Zen of the Page</TITLE> </HEAD>
The body is where the action takes place, and everything you see and hear on the screen will come from what you write in the body container. If you simply wrote the HTML that's shown in the picture, and then wrote your name inside the body container, it would display a web page with your name.

When we want to communicate with the browser, we signal it by encasing our message inside of angle brackets <>. Anything that's not inside of these brackets will be rendered as text. On the other hand, when the browser sees a < bracket, it will try to interpret everything that follows until it finds a matching > as a command.

A common HTML error is forgetting the > in a message sent to the browser. Another is using a < character within a piece of text (such as "if your age is < 18"). If you need to include these characters as text (as we do throughout this section), you create them with special codes so that the browser doesn't become confused: &LT; displays <, and &GT; displays >.

Not too complex when you break it down into simple pieces, is it? That's the whole idea of the "zen." It's easy to get tangled up in details, when what's really going on underneath is very simple.

When you're ready for the next meditation, click here.

Dudette