Fandom

HTML & CSS Wiki

@-rule

649pages on
this wiki
Add New Page
Comments0 Share

CSS @-rules, or at-rules, are instructions or directives to the CSS parser. They can be used for a variety of purposes.

The @charset at-rule can be used to specify the character encoding of an external style sheet. It must appear before anything else in the file.

The @import at-rule allows users to import one style sheet into another. All @import at-rules must appear before any rules.

The @media at-rule lets users target rules to the media types they specify.

The @page at-rule can be used to specify margins for paged media. You can set different margins for left- and right-hand pages when you’re printing double-sided pages, as well as for the first page.

The @font-face at-rule allows users to specify custom fonts.

The @namespace at-rule in CSS3 lets users declare an XML namespace, as well as an optional prefix with which that namespace can be specified.

See Also

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.