Web development

CSS @import Rule

CSS @import Rule

The CSS @import rule allows you to import a style sheet into another style sheet.

The CSS @import rule should be placed at the top of the document (after any @charset declaration).


@import url| list-of-mediaqueries;

url – URL that represents the location of the resource to import.

list-of-mediaqueries – comma-separated list of media queries conditioning the application of the CSS rules specified in the linked URL.


Import custom font to your HTML document (used font source:

<!doctype html>
<meta charset="UTF-8">
<title>CSS @import Rule</title>
        @import url('');

        p {
  font-family: 'Dancing Script', cursive;

    <p>Some text...</p>


Enjoy coding!

Read also:

CSS Fonts

HTML Text Formatting And Styles

CSS Styling Links