Assignment 4: Cascading Style Sheets and Structure
Question 1: Linking to Cascading Style Sheets
Create a set of 3 identicial web pages that differ only in the way they
applying CSS style to HTML content:
- First document: External style sheet
- Second document: Internal style sheet
- Third document: In-line style sheet
Use the following CSS information and HTML content to create the
pages.
CSS Information
P { font-family: courier, monospace;
font-size:
large }
.center { text-align: center }
H1 { font-family: Ariel,
sans-serif;
font-weight: bold;
text-align: center;
font-size: larger;
}
H1.title { font-family: fantasy;
text-transform: uppercase }
HTML Code Fragment to Style
<H1 CLASS="title">Moby Dick</H1>
<P
CLASS="center">By Herman Melville</P>
<H1>Loomings</H1>
<P> Call me Ishmael. Some years ago--never mind how long precisely
--having little or no money in my purse, and nothing particular to interest me
on shore, I thought I would sail about a little and see the watery part of the
world. It is a way I have of driving off the spleen, and regulating the
circulation. Whenever I find myself growing grim about the mouth; whenever it
is a damp, drizzly November in my soul; whenever I find myself involuntarily
pausing before coffin warehouses, and bringing up the rear of every funeral I
meet; and especially whenever my hypos get such an upper hand of me, that it
requires a strong moral principle to prevent me from deliberately stepping into
the street, and methodically knocking people's hats off--then, I account it
high time to get to sea as soon as I can. </P>
<P>This is my
substitute for pistol and ball. With a philosophical flourish Cato throws
himself upon his sword; I quietly take to the ship. There is nothing surprising
in this. If they but knew it, almost all men in their degree, some time or
other, cherish very nearly the same feelings towards the ocean with me. There
now is your insular city of the Manhattoes, belted round by wharves as Indian
isles by coral reefs--commerce surrounds it with her surf. </P>
Source of Moby Dick text was
Project Gutenberg
Question 2: Style Sheet Linking
What are the advantages and disadvantages of the three different ways to
associate a CSS style to an HTML element?
Question 3: Using CSS Styling and HTML text to create a button with
similar graphical effects of the following image:

Due
April 3rd, 2003