Share this Page URL

Chapter 14. A Beginner's Guide to Style ... > Three Sheets to the Web: Style Sheet... - Pg. 163

A Beginner's Guide to Style Sheets 163 Figure 14.4. Using inline styles lets you set a style for individual tags and thus override the default style. Applying a Style to a Section The <DIV> tag is used to divide your page into separate sections. It doesn't do a whole lot by itself, although the browser usually inserts a line break (equivalent to a <BR> tag) before the <DIV> tag and after the </DIV> end tag. However, by including the STYLE attribute inside the <DIV> tag, you can apply an inline style to everything that's inside one of these sections. Here's an example: <DIV STYLE="font-size: 16pt"> <H1>This Is a 16-Point Heading</H1> This here sentence will appear in a 16-point font. <H2>So Will This Heading</H2> </DIV> In this case, everything between <DIV> and </DIV> gets formatted with the 16-point font size style.