You can specify styles using external style sheets, which you connect to a page using the <LINK> element like this: (Listing 21-02.html on the web site) <HTML> <HEAD> <TITLE>Using the <STYLE> Element</TITLE> <LINK REL="stylesheet" HREF="21-03.css" </HEAD> <BODY> <H1> Using the <STYLE> Element </H1> <P> This text is italic. </P> </BODY> </HTML> This HTML links the web page to an external style sheet, 21-03.css. Here's what that style sheet looks like: (Listing 21-03.css on the web site)BODY {background: black; color: white} P {font-style: italic} As you can see, this file contains just the style sheet rules that would have appeared in an embedded <STYLE> element. |