Defining a Page

Now that you've defined a font size rule for an individual <p> tag, let's define the same style sheet rule for all <p> tags on a page.

Using the "Page.html" file from the "CSSExercises" folder we need to add a <style> tag and the style rule before the </head> tag.

  1. switch to your text editor
  2. go to the "File" menu
  3. choose "Open"
  4. locate the "CSSExercises" folder
  5. open the "CSSExercises" folder
  6. open "Page.html"
  7. click before the </head> tag
  8. enter the following text:

    <style type="text/css">
    <!-- /* Hide content from old browsers */
    p {font-size:2.0em}
    /* end hiding content from old browsers */ -->
    </style>


  9. save the file
  10. view in your browser

All paragraph text should be approximately double-size as in "Defining a Page Example."

See if you can make the font size 1.0em just for the 2nd paragraph which reads "The next text is an unordered list:" If you're successful the page will be like "Defining a Page and Tag Example." If you're stuck, the answer is in the source code of the example page.

When you're ready, move on to "Importing an External Style Sheet."