HTML and CSS Reference
In-Depth Information
{width: 65%;
border-color: #545859;
border-style: ridge;
border-width: 10px;}
.menu {text-align: center;
width: 60%;}
.menuicon {width: 23%;}
.menupipe {width: 1%;}
{color: white;
background-color: #757775;}
tr.stripe {background-color: #d8d8ce;}
td.bolder {font-weight: bold;}
{caption-side: bottom;
font-style: italic;}
The format of the external style sheet is very similar to the format of an embedded style
sheet. An external style sheet, however, does not need <style> </style> tags to start and end
the style sheet; it only needs the style statements.
To create an external style sheet, enter all of the style statements in a text file using
Notepad++ or another text editor, and then save the text file with a .css (for Cascading
Style Sheets) extension. The code shown above, for example, can be saved with the file-
name stylesch4.css and then linked onto multiple Web pages.
Remember that the <head> tag is used for a variety of purposes. The information
contained within the <head> </head> container of your HTML document provides infor-
mation to browsers and search engines but is not displayed on the Web page itself. The
following tags can be used within the <head> </head> container: <base>, <link>, <meta>,
<script>, <style>, and <title>. For each Web page to which you want to apply the styles in
an external style sheet, a <link /> tag similar to the sample code below must be inserted
within the <head> </head> tags of the Web page:
<link rel=”stylesheet” type=”text/css” href=”stylesch4.css” />
The <link /> tag indicates that the style sheet stylesch4.css should be applied to this Web
page. The property-value statement rel="stylesheet" defines the relationship of the linked
document (that is, it defines it as a style sheet). The property-value statement type="text/
css" indicates the content and language used in the linked document. The property-value
statement href="stylesch4.css" indicates the name and location of the linked style sheet,
stylesch4.css. To apply this style sheet to other pages in the Web site, you would insert the
same <link /> tag between the <head> </head> tags of each Web page.
Search WWH ::

Custom Search