The role of CSS
Lesson 4, Fundamentals of HTML, XHMTL, and CSS 67
Styling a heading
To get a sense of how CSS works, you’ll create a simple CSS rule that changes the style of a
heading in your page. In your index.html page, you already have the content “SmoothieWorld”
nested inside an
tag. Perhaps one of the best ways to begin thinking about how CSS
works is to consider how the default style of this heading is rendered in the browser.
1 Examine the heading of the fi le you previewed in the last step of the previous exercise. The
style and formatting instructions are being provided by the browser. The size, color, and font
are provided by the browser because exact formatting instructions are not specifi ed. The
browser only knows that this is a headline. You will redefi ne this style with a CSS rule.
2 In your code, locate the
following the closing tag, then press return to add a new line of code. Type the following: