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.
- switch to your text editor
- go to the "File" menu
- choose "Open"
- locate the "CSSExercises" folder
- open the "CSSExercises" folder
- open "Page.html"
- click before the
</head>tag - 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>
- save the file
- 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."