Cascading Style Sheets (CSS):
Hands-on Packet.
author: jim.cerny@unh.edu
Here's the Plan.
We will practice the
syntax of CSS styles to demonstrate practical use
of CSS, selecting
from the examples below.
I will
discuss one or more examples, then give you
time to do them on your own.
Most of the examples are linked below in two forms.
The first link is to its complete form and the
second link (file name begins with "x") is to its
incomplete form,
i.e., minus the CSS code that is the focus of the
example (to minimize the typing when keying
these for practice). The idea is to click on
the incomplete form, view source, make the edits,
then save it to your desktop and display the
result in your browser.
There are more examples than we normally get to
in class, so we will pick and choose, leaving
some for you to explore on your own.
Beware of simple syntax mistakes and typos.
Make sure you have colon (":") and semicolon (";") delimiters where
they are needed. Watch where white space is
allowed or disallowed. And make sure your
curly braces ("{ }") match-up and that they are not
confused with parentheses.
Advice for Later.
The important thing about CSS is to get started.
Don't wait until you really have enough time or
for just the right project. Next time you need
to create or revise a Web page, try to incorporate
some simple CSS uses, something that will "degrade
gracefully" if a browser doesn't support it.
For example,
promise yourself that you will no longer use the
FONT tag, but CSS instead.
Or use CSS to set a left margin or to control
Hn (header) elements. Sooner or later you will reach
a threshold where it becomes second nature to
include such use, that it no longer seems
an interruption of your work flow. Trust me.
Hands-on Examples.
[an error occurred while processing this directive]
|