CSS: Cascading Style Sheets
Applying Styles More Selectively
- class - an attribute for an html element, e.g.
<a href="http://cs.montana.edu" class="work">
- stylesheet - use a.work
- id - an attribute for an html element (must be unique), e.g.
<a href="http://cs.montana.edu/paxton id="homepage">
- stylesheet - use #id
Grouping Elements
- Use the html attribute span (with the class or id attribute)
within a block level element (such as p).
- Use the html attribute div (with the class or id attribute)
to group one or more block level elements (such as everything within
an unordered list).
The Box Model
We will study the box model in more detail in our next lecture.
For now it is important to understand the following terms:
- Margin
- Border
- Padding
- Content
Page Counters
You can easily place a counter on a web page. One way to do this
is to go to this website,
choose what you want the counter to look like,
identify the web address of the page that you want
to be counted, and then copy the html code into your page where you want it.
Simple, huh!?