DIV and SPAN Tags
This lesson will introduce the very basic use of the DIV and SPAN tags as
well as the STYLE tag. Here are some basic examples:
-----------------------------
This section is written using a style which has been defined
with the name one. If you look at the code for this section you will see
that the tag surrounding it looks like this: <DIV class=one>
This section is written using a style which has been defined
with the name two. In the HEAD section of the page the STYLE tag was used to
set up three styles to be used by DIV.
This section is written using a style which has been
defined with the name three. You should carefully inspect the syntax used in
the style tag. In particular you should notice the use of curly braces,
colons, and semi-colons.
----------------------------
That gives you an idea of how to use DIV and STYLE, now for SPAN. Inspect
this example:
----------------------------
The SPAN tag is used to allow for a style to be used within
another style. Here SPAN is used to
change the background color while the DIV tag is still open. Now
that the SPAN tag is closed the first style is used.
----------------------------
ASSIGNMENT:
You will set up three styles in this
activity and use SPAN twice. Here are the specifics:
STYLES: You will will define three styles. Each will use a different font
color and two of them will set different background colors. Your styles will
be named AUTHOR, BOOK_TITLE, and YEAR.
SPAN: Your spans will change the background colors. Each will use a
different color.
TOPIC: You will be writing a somewhat odd bibliography which includes book
summary information. Here's an example:
--------------------------------
1. Macky, Fred.
School Discipline: Lessons
From South Park
In this classic book, Mr. Macky
discusses his theories of school discipline and applies many of the lessons
he learned while serving as the counselor at South Park Elementary School He includes many humorous accounts
of events at the school as well as a few poignant anecdotes.
Rocky Mountain Press, 2002.
--------------------------------
You will create a total of ten such entries for your bibliography (remember
that this is not the standard format being used here).