CSS Assignment 1
Introduction to Styles
For this assignment I decided to STYLE the assignment posted by Kynn. Any text in
white is a comment, or a response to a question set in the assignment.
This has taught me a few things about styles, for example notice that the above sentances
are bold but the style itself isn't (as seen in this text) - it inherits the bold feature
from the <P> selector.
To complete this assignment, you should have read chapter 2 in the
"Web
Designer's Guide to Style Sheets" textbook. A list of sample styles you can use
will be posted as another discussion thread in this folder.
Note use of inline style on the Anchor tag, to remove the underline.
In the chapter, we see several ways in which you can incorporate styles into a web page.
These include:
An unordered list:
- Embedded stylesheet using <STYLE>
- External stylesheet linked using <LINK>
- Importing a stylesheet using @import
- Inline styles using STYLE="" attributes
In this assignment, you will use these techniques in the following way:
An ordered list:
- Create a web page. This can be anything that has a decent amount of content, because
we're going to be marking up that content with style. Have properly closed
<P>
tags, several <H1> or
<H2> headings, and anything else you like --
<UL>s and <LI>s
and <BLOCKQUOTE>s are good.
- Add stylesheets to the page as described in the following items.
- Create a stylesheet -- a list of style rules. Decide whether or not you want to make
this an embedded stylesheet using <STYLE> or an external
one using <LINK>. Do you know the differences and
advantages of each? Embeded Styles are stored with the HTML and apply
only to the HTML document they are contained in. Linked Styles are stored in a separate
ASCII file with a .CSS extension, these can be applied to multiple HTML files, a change to
the .CSS file will cause changes to made to all the HTML files that use it.
- Your stylesheet should contain at LEAST the following:
An unordered list within an ordered list:
- A rule for the BODY element, that will affect all elements on the page included
- A rule for a heading such as H1 included, also a H2
- Something that changes the color of an element included
- At least two rules based on class selectors, as described on pages 34-37 included, this text is an example
- At least one contextual selector rule (pages 38-39) included, e.g. this unordered list in the ordered list
- At least one rule for an <A> pseudo-class
(described under "Link Effects" on page 40-43) included, see link above to the course book web site, and the links below
- A comment describing who you are and when you made the stylesheet
- Also, include at least two inline styles using the STYLE attribute on some HTML tags. included
- When you have completed this, please post your URL here, as described below.
To post your assignment, reply to this message and make two links as follows:
<A HREF="http://www.wherever.your/~page/is.html">HTML page</A>
<A HREF="http://www.wherever.your/~stylesheet/is.css">Stylesheet</A>
(if you used an external style sheet -- if not, then just one link is necessary)
Back to my CSS Course Index.