J. Blustein

Web-centric Computing

Some Example Code

CSS Example 2


  <p class="large"
     >This is some text in class <code>large</code> element.</p>

  <p class="large"
     >This is <span class="large"
                 >some <em>emphasized text</em> in
                 </span> class <code>large</code>.</p>

  <div class="large">
    <p>These two <code>p</code>s are in a <code>class="large" div</code>.</p>

    <p>Are they the same as the other <code>class="large"</code> elements?</p>

CSS Rules

  body  { background-color: rgb(80%,80%,80%); color: black }
  em    { text-decoration: underline; color: red; background-color: inherit;
          font-weight: bold }
 .large { font-size: 2.5em; }


This is some text in class large element.

This is some emphasized text in class large.

These two ps are in a class="large" div.

Are they the same as the other class="large" elements?


See Also

Example 3 (and Example 1)


The notes for the first example are the same as for this one.

11 Nov 2001
CS 4173 Prof:
J. Blustein <jamie@cs.dal.ca>

Valid XHTML 1.0!, Valid CSS!