how to import css file code example

Example 1: connext html file to css

<link rel="stylesheet" type="text/css" href="style.css">

Example 2: how to link your css file to html

<head>
	<link rel='stylesheet' href='style.css'>
</head>

Example 3: import css in another css file

@import "navigation.css"; /* Via string */

or

@import url("navigation.css"); /* Via url */

Example 4: html how to import css file

<head>
	<link rel="stylesheet" href="mystyle.css">
</head>

Example 5: how to import a css file in html

To add, make a stylesheet and to import we write <link rel="stylesheet" href="styles.css">

Tags:

Css Example