html css import code example

Example 1: add css file to html

/*
Adding css file into html document
*/

<link rel="stylesheet" type="text/css" href="yourstylesheetname.css">  /* add this line into head tag of the file with change in file name. */

/*
I hope it will help you.
Namaste
*/

Example 2: add stylesheet html

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

Example 3: stylesheet css

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

Example 4: easy way to import cs html

<link rel=“stylesheet” type=“text/css” href=“index.css” />

Example 5: @import css

@import "navigation.css"; /* Using a string */
or
@import url("navigation.css"); /* Using a url */

Example 6: how to refer to external style sheet

<html>
<head>
<link rel="stylesheet" type="text/css" href="Name.css">
</head>
<body>
.
.
.
</body>

Tags:

Html Example