Add CSS to page code example

Example 1: easy way to import cs html

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

Example 2: how to add a css file in html

<!DOCTYPE html>
<html>
<head>

  <link rel="stylesheet" href="styles.css">

</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

Example 3: how to add css to html

<link rel="stylesheet" href="hi.css">

Example 4: add css to page

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

Example 5: how to use css

<link rel="stylesheet" href="stylesheet.css">
<div class="mydiv"></div>
<style>
.mydiv {
background-color: /*Color*/;
color: /*Another color*/;
}
</style>

Tags:

Css Example