External Style Sheets


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 &lt;STYLE&gt; Element</TITLE>  <LINK REL="stylesheet" HREF="21-03.css"  </HEAD>      <BODY>          <H1>              Using the &lt;STYLE&gt; 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.



Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net