@charset
@font-face
@media
@page
AT-RULES: @import
@import
url(address)
media-type, ...
;
Compatibility:
IE5+ N6+
Version:
Level 2
The
@import
at-rule allows you to designate an external style sheet file to be used with an HTML document.
The syntax for an at-rule is an @ symbol, followed immediately by an unique identifier, which in turn is followed by the block which contains content that is applied on a document level. The block syntax is either:
all content contained between a pair of curly brackets,
or is all content contained between the unique identifier and a semi-colon.
There are five at-rules:
@charset, @font-face, @import. @media,
and
@page
.
The mandatory
url(address)
component is the url address of the external style sheet file. The opening and closing parentheses are required.
The optional
media-type
component is a list of zero or more media types which are deliniated (separated) by commas. Some of the permitted values are:
all
- the default.
aural
- speech synthesizers.
braille
- braille tactile feedback devices.
embossed
- paged braille printers.
handheld
- handheld devices.
print
- printed paged and print preview.
projection
- projectors or print to transparencies.
screen
- color computer screens.
tty
- teletypes.
tv
- television-type devices.
This file has the same CSS style rules as the
DevGuru
site.
Code:
<html>
<head>
<title>@media test</title>
<style type="text/css">
@import url(http://www.devguru.com/include/STYLERULES.css);
</style>
</head>
<body>
<p>
I love <a href="http://www.devguru.com">DevGuru</a>!
</p>
</body>
</html>
Output:
View output in separate window
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information