|
|
Open your page1.html file in Notepad. Save it as page6.html. Now open it in your Browser, to watch the changes as you change your code during the lesson. |
WE THE PEOPLE of the United States, in order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defense, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America. |
I'm sure when <BLOCKQUOTE> was first devised it had a loftier purpose, such as quoting profound bits of prose from authors I've never even heard of. But here in the trenches it serves a more mundane purpose... easy indenting. |
Another very useful little tool is a LIST. There are ORDERED lists and UNORDERED lists.
This is an ordered list
|
This is an unordered list
|
Start with this...
<BODY BGCOLOR="#FFFFFF">
What I want for Christmas
</BODY>
What I want for Christmas |
Add a pair of unordered list tags.
<BODY BGCOLOR="#FFFFFF">
What I want for Christmas
<UL>
</UL>
</BODY>
What I want for Christmas |
<BODY BGCOLOR="#FFFFFF">
What I want for Christmas
<UL>
<LI>a big red truck
</UL>
</BODY>
What I want for Christmas
|
<BODY BGCOLOR="#FFFFFF">
What I want for Christmas
<UL>
<LI>a big red truck
<LI>a real fast speedboat
<LI>a drum set
<LI>a BB gun
<LI>a Melanie Griffith
</UL>
</BODY>
What I want for Christmas
|
How to make an ordered list? Easy! Change the <UL> tag to <OL>.
<BODY BGCOLOR="#FFFFFF">
What I want for Christmas
<OL>
<LI>a big red truck
<LI>a real fast speedboat
<LI>a drum set
<LI>a BB gun
<LI>a Melanie Griffith
</OL>
</BODY>
What I want for Christmas
|
Another type of list is a definition list.
Start with this...
<BODY BGCOLOR="#FFFFFF">
<DL>
</DL>
</BODY>
Then add a definition title...
<BODY BGCOLOR="#FFFFFF">
<DL>
<DT>10th Amendment
</DL>
</BODY>
|
And a definition item.
<BODY BGCOLOR="#FFFFFF">
<DL>
<DT>10th Amendment
<DD>The powers not delegated to the United States by the Constitution, nor prohibited by it to the States, are reserved to the States respectively, or to the people.
</DL>
</BODY>
|
As a finishing touch I like to make the definition title bold. It's not required, but I think it looks much better that way.
<BODY BGCOLOR="#FFFFFF">
<DL>
<DT><B>10th Amendment</B>
<DD>The powers not delegated to the United States by the Constitution, nor prohibited by it to the States, are reserved to the States respectively, or to the people.
</DL>
</BODY>
|
Another little widget that you will find yourself using alot is the Horizontal Rule.
<BODY BGCOLOR="#FFFFFF">
<HR>
</BODY>
|
We have a few options available to us...
<BODY BGCOLOR="#FFFFFF">
<HR WIDTH=20%>
<HR WIDTH=50%>
<HR WIDTH=100%>
<HR WIDTH=20>
<HR WIDTH=50>
<HR WIDTH=100>
</BODY>
|
This one is pretty self explanatory.
<BODY BGCOLOR="#FFFFFF">
<HR WIDTH=60% ALIGN=LEFT>
<HR WIDTH=60% ALIGN=RIGHT>
<HR WIDTH=60% ALIGN=CENTER>
</BODY>
|
We can control the thickness...
<BODY BGCOLOR="#FFFFFF">
<HR WIDTH=60% SIZE=1>
<HR WIDTH=60% SIZE=3>
<HR WIDTH=60% SIZE=8>
<HR WIDTH=60% SIZE=15>
</BODY>
|
And we can make it a solid line.
<BODY BGCOLOR="#FFFFFF">
<HR WIDTH=60% SIZE=1 NOSHADE>
<HR WIDTH=60% SIZE=3 NOSHADE>
<HR WIDTH=60% SIZE=8 NOSHADE>
<HR WIDTH=60% SIZE=15 NOSHADE>
</BODY>
|
<DT> and <DD> must be used as pairs
within the <DL> tags
<BR
CLEAR=["left"l "right"l"all"]>
Forces a line break. The CLEAR attribute stops text from flowing around an image
<DIV
CLEAR=["left"|"right"|"all"]>
ALIGN=["left"|"right"|"center"]>
NOWRAP>text</DIV>
- division within the page
<P
ALIGN=["left"|"right"|"center"|"justify"]
NOWRAP>paragraph</P>
- a new paragraph
<HR
CLEAR=["left"|"right"|all"]
SRC= "URL"
SIZE=value
WIDTH=pixels|percent>
ALIGN=["left"|"right"|"center"]
NOSHADE> - a horizontal rule
The code for the red bar is
<HR width=80% SIZE=8 NOSHADE COLOR=red>
Basic Version | Try a little colour, play with text too. | |
<UL TYPE="square"> <LI>List Item 1 <LI>List Item 2 <LI>List Item 3 </UL> This is what you get...
|
<ul type="square"> <!-- try disc, circle, square --> <li style="color: forestgreen"><font color="navy">Sprite</FONT> <li style="color: red"><font color="green">Wedding</FONT> <li style="color: blue"><font color="maroon">Plans.</FONT> </UL> This is what you get...
|
And this is the HTML format for producing this format:
<B>Nested Unordered List</B> <ul> <li>This is the first item <li>This is the second item <ul> <li> This is the first subitem of the second item <ul> <li> And this is a subitem of a subitem <li> Getting lost yet? </ul> <li> This is the second subitem of the second item <li> This is the third subitem of the second item </ul> <li>This is the third item </ul>
<ul type=xxxx>where xxxx can be:
HTML | How it Looks |
---|---|
<ul type=square> <li>this is item 1 <li>this is item 2 <li>this is item 3 <li type=circle> Hey! how about these bullets? <li>this is another item <li>and one more <li type=disc> Hey! how about these bullets? </ul> |
|
Note that the type specified in the <li type=xxxx> tag is used by all succeeding <li> tags until another bullet type is selected.
Arabic | Capital Letters | Small Letters | Large Roman | Small Roman |
---|---|---|---|---|
<ol type=1> | <ol type=A> | <ol type=a> | <ol type=I> | <ol type=i> |
|
|
|
|
|
We presented an example of using ordered lists within ordered lists to create outlines -- with the type attribute we can have pages with standard format:
Arabic | Capital Letters | Small Letters | Large Roman | Small Roman |
---|---|---|---|---|
<ol type=1 start=11> |
<ol type=A start=11> |
<ol type=a start=11> |
<ol type=I start=11> |
<ol type=i start=11> |
|
|
|
|
|
And finally you can change the numbering sequence within a list by adding a value=z attribute to the <li> tag. Look at this example:
HTML | How it Looks |
---|---|
<ol type=A start=5><i> Important Cheese Laws</i> <li>Cheese Curing Act of 1905 <li>Milk Content Ruling of 1923 <p> <li value=12>Cheese Import Tariff of 1942 <li>Cheese Freshness Codes of 1942 <p> <li value=1>Cheese Values Act of 1789 |
|
It may not be exactly clear (especially from this silly example!) when you might use these tags -- just keep them in your mind as potential tools in your web writing.
|