2. Designing your site continued.
Click here for the previous lesson.
Our new page's (color.html) code so far looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
My COLOR demonstration html page.
</title>
</head>
<body bgcolor="beige" text="beige">
COLOR the World
</body>
</html>
Parsed, it looks like:
COLOR the World
Now just for fun, we will introduce the font
tag including our color attribute, and use them here to
color each letter of COLOR a different color.
Here is what you could change the COLOR my world line
of text to:
<font color="orange">C</font><font color="green">O</font><font color="coral">L</font><font color="brown">O</font><font color="violet">R</font><font color="blue"> the World</font>
Parsed, it will look like:
COLOR the World
You already have learned the use of the center tag, now
lets try using the blockquote tag to indent a block
of text aligned nicely on one side.
<blockquote>
Blockquotes indent the text to present your content in a block which
is offset or indented or has a margin on the left side. As you can
see it is usually preferable to text which is centered as it is a
bit easier to read.
</blockquote>
This is some text which is following the closing blockquote tag
and so is at the normal place for text to start on the left and
not indented as is the blockquote text above.
It is easy to see this is a handy tag as in below:
Blockquotes indent the text to present your content in a block which is offset or indented or has a margin on the left side. As you can see it is usually preferable to text which is centered as it is a bit easier to read.
This is some text which is following the closing blockquote tag
and so is at the normal place for text to start on the left and
not indented as is the blockquote text above.
|
This is getting easy eh?
Two blockquotes follow:
<blockquote>
You can put one block quote within another.
This way you can have several layers of indentation.
<blockquote>
Each one will start a bit to the right of the previous
blockquote. This one is getting kindda narrow for this
page so we will notgofurther but you can if you wish.
</blockquote>
</blockquote>
This parsed as you might expect:
Two blockquotes follow:
You can put one block quote within another.
This way you can have several layers of indentation.
Each one will start a bit to the right of the previous
blockquote. This one is getting kindda narrow for this
page so we will notgofurther but you can if you wish.
|
Blockquotes are not the only tags we can use for
formating, we can use the paragraph element
with a cool seperation kind of effect as coded:
Here is the end of the first line.
<p>Here begins and ends a new paragraph.</p>
<p>Here begins and ends another paragraph.</p>
<p />Here, this paragraph has no end tag. Please note
the difference in how it is written as a pair of
tags from how it is written as a single tag, and just like the
break tag, it ends with a space, a slash (/), and then, the angle bracket (>).
When this is parsed, the proper blank line is inserted
before the paragraph:
Here is the end of the first line.
Here begins and ends a new paragraph.
Here begins and ends another paragraph.
Here, this paragraph has no end tag. Please note the difference in how it is written as a pair of tags from how it is written as a single tag, and just like the break tag, it ends with a space, a slash (/), and then, the angle bracket (>).
One more tag we should mention before moving on to the topics of
lists and tables, is the teletype tag:
<tt>Here is some text enclosed within the teletype tag.</tt>
<br />But this is normal again.
Here is some text enclosed within the teletype tag.
But this is normal again.
Lets turn now to lists. Lets first learn that list
come in two forms; unordered and ordered. Lists
can contain other lists and are a good way to
make outlines. Making a list invloves a tag pair for
the list itself as a whole and seperate list elements (tags)
for each item in the list. Here is the code for an ordered
list first, followed by an unordered list nested within another unordered
list which is itself nested within yet another unordered list. Note the
use of the list item tag as a single tag an as a pair of tags again:
Here comes the ordered list:
<ol>
<li>The first item.</li>
<li>And still another item.</li>
<li>And more of the item.</li>
<li />Still one to go item.
<li />And a final item.
</ol>
Here comes the unordered list:
<ul>
<li>The first item.</li>
<li>And an item with another list of items.
<ul>
<li>The sub list one first item.</li>
<li>The sub list second item has a sub list too.
<ul>
<li>And more of the item.</li>
<li />Still one to go item.
<li />And a final item.
</ul></li>
<li />And a final item on the other list section.
</ul>
</li>
<li>And more of the item.</li>
<li />Still one to go item.
<li />And a final item.
</ul>
Note how the items have a mark before them to set them off
as distinct and in the ordered list they are actually numbers
inserted to correctly identify the item in the list order. Well,
that is the work of the list tags:
Here comes the ordered list:
- The first item.
- And still another item.
- And more of the item.
Still one to go item.
And a final item.
Here comes the unordered list:
- The first item.
- And an item with another list of items.
- The sub list one first item.
- The sub list second item has a sub list too.
- And more of the item.
Still one to go item.
And a final item.
And a final item on the other list section.
- And more of the item.
Still one to go item.
And a final item.
That second example may seem a bit difficult to code, and it is.
Try simple lists first, then try inserting one list completly within another
by copying it completly and pasting it into the code for the other list. Note
how we had made the new list within a pair of list item tags, and that
the list item close tag follows the inserted list closing tags.
That is enough lists for now, on to some tables!
|
Click here to proceed to Web Page Design Lesson Number Six.
- Preliminary
- Design your site
- Uploading files.
- Testing your site.
- More...