Creating an internal style sheet

The HTML code snippet below is taken from the body section of a simple document that displys headings of different sizes. The headings' colors are determined by the value assigned to the color attribute of the nested <font> tag in each case:

<!– headings colors set by the font color attribute –>
<h1> <font color = "red" > h1 Heading</font></h1>
<h2> <font color = "blue" > h2 Heading</font></h2>
<h3> <font color = "green" > h3 Heading</font></h3>
<h1> <font color = "red" > h1 Heading</font></h1>

h1 Heading

h2 Heading

h3 Heading

h1 Heading

You can accomplish the same thing by using a style sheet as so:

<!– headings colors to be set by style rules –>
<h1>h1 Heading</h1>
<h2>h2 Heading</h2>
<h3>h3 Heading</h3>
<h1>h1 Heading</h1>
<!– internal style sheet for headings colors –>
< style type = "text/css">
h1 {color: red}
h2 {color: blue}
h3{color: green }