Creating web pages V


Subject: Creating web pages V
From: Jim Buchanan <c22jrb@dawg.delcoelect.com>
Reply-To: <delco_explorers@hybiss.delcoelect.com>
X-List-Processor: perlproc 0.9, By J.R. Buchanan
X-Comment: Delco Computer Explorers mailing list
Sender: delco_explorers@hybiss.delcoelect.com

OK. I said we'd do headings and horizontal rules (lines) this time.

Let's start with a simple page using what we've learned so far. We'll just have two short paragraphs:

<html>

<head>
<title>A demonstration web page</title>
</head>

<body>

<p>

Two households, both alike in dignity, in fair Verona, where we lay our
scene. From ancient grudge, break to new mutiny, where civil blood makes
civil hands unclean.

<p>

In Xanadu did Kubla Khan, a sacred pleasure dome decree, where Alph, the
sacred river ran, from the mountains to the sea,

</body>

</html>

OK, that's two paragraphs. Now let's say you want to put headers over each. You use the "<h1>" and "</h1>" tags. Like this:

<html>

<head>
<title>A demonstration web page</title>
</head>

<body>

<h1>Shakespeare</h1>

<p>

Two households, both alike in dignity, in fair Verona, where we lay our
scene. From ancient grudge, break to new mutiny, where civil blood makes
civil hands unclean.


<h1>Coleridge</h1>

<p>

In Xanadu did Kubla Khan, a sacred pleasure dome decree, where Alph, the
sacred river ran, from the mountains to the sea,

</body>

</html>

What does the '1' in "<h1>" indicate? There are multiple levels of headings, "<h1>" being the highest. Let's change our example to use two levels of headings.

<html>

<head>
<title>A demonstration web page</title>
</head>

<body>

<h1>Dead writers</h1>

<h2>Shakespeare</h2>

<p>

Two households, both alike in dignity, in fair Verona, where we lay our
scene. From ancient grudge, break to new mutiny, where civil blood makes
civil hands unclean.

<h2>Coleridge</h2>

<p>

In Xanadu did Kubla Khan, a sacred pleasure dome decree, where Alph, the
sacred river ran, from the mountains to the sea,

</body>

</html>

Now we have one larger heading for the whole document, and two smaller headings, one per poet. Actually, there is nothing that says browsers have to display headings in different sizes, but all of the ones I've used have.

Now, let's get to the horizontal rules. Let's put one horizontal line before the two paragraphs, and one after. To do this, we use the "<hr>" tag. This is another lonely tag.

<html>

<head>
<title>A demonstration web page</title>
</head>

<body>

<h1>Dead writers</h1>

<hr>

<h2>Shakespeare</h2>

<p>

Two households, both alike in dignity, in fair Verona, where we lay our
scene. From ancient grudge, break to new mutiny, where civil blood makes
civil hands unclean.

<h2>Coleridge</h2>

<p>

In Xanadu did Kubla Khan, a sacred pleasure dome decree, where Alph, the
sacred river ran, from the mountains to the sea,

<hr>

</body>

</html>

Next time, we'll do in-line images. I might include hypertext links as well, but I suspect that we should devote an entire message to each.

BTW, feel free to try this stuff and ask questions, that's how you learn!

-- 
Jim Buchanan        c22jrb@dawg.delcoelect.com         jbuchana@iquest.net 
================= http://members.iquest.net/~jbuchana ====================
"This is the house of the long ago, Where the old ones murmur an endless woe,
 Where the pain of time is an actual pain, And things once known always come
 again." -Cordwainer Smith
==================== http://hybiss.delcoelect.com ========================