Skip to main content

What is At-Rule @?

At-rules are CSS statements that instructs CSS how to behave. They begin with an at sign, @ followed by an identifier and includes everything up to the next semicolon, ; or the next CSS block, whichever comes first.

/* General structure */
@IDENTIFIER (RULE);

/* Example: tells browser to use UTF-8 character set */
@charset "utf-8";
at-rulesDescription
@charsetDefines the character set used by the style sheet.
@importTells the CSS engine to include an external style sheet.
@namespaceTells the CSS engine that all its content must be considered prefixed with an XML namespace.
@mediaA conditional group rule that will apply its content if the device meets the criteria of the condition defined using a media query.
@supportsA conditional group rule that will apply its content if the browser meets the criteria of the given condition.
@pageDescribes the aspect of layout changes that will be applied when printing the document.
@font-faceDescribes the aspect of an external font to be downloaded.
@keyframesDescribes the aspect of intermediate steps in a CSS animation sequence.