Share this page 

Share a stylesheetTag(s): HTML/CSS


Stylesheets are a very useful to share common attributes. An added bonus is when a style sheet is attached to page to Zoom effect (with the mouse roulette) is disabled so your design is not affected.

Take the following stylesheet (test.css)

<style type="text/css"> 
<!-- 
    body { font-family: Verdana,Arial, Helvetica, sans-serif; 
    font-size: 10pt} 
    p { font-family: Arial ; font-size: 10pt } 
    td { font-family: Arial ; font-size: 12pt } 
    th { font-family: Verdana; font-size: 10pt } 
    h1 { font-family: Arial; font-size: 24pt; } 
    h2 { font-family: Times; font-size: 18pt; } 
    h3 { font-family: Arial; font-size: 11pt; } 
    A:link { color:#000000; } 
    A:visited { color:#336633; } 
    A:hover { color:#FF0000; } 
--> 
</style> 
This stylesheet can be attached to a page with the LINK tag.
<HTML><HEAD>
<TITLE></TITLE>
<LINK TYPE="text/css" HREF="test.css" REL="stylesheet" 
   TITLE="mystyle"> 
</HEAD>

<BODY>
<h1> Title h1</h1>
<h2> Title h2</h2>
<h3> Title h3</h3>
<p>Let's a have a table
<table><th>Table header<tr><td>element 1<td>element2
</tr></table>
</BODY>
</HTML>