Attaching a CSS file to an HTML file

To attach the CSS to the HTML document, import the following code in your HTML file: 

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

The HEAD tags are the parts of your HTML document.

“example.css” is varies depending on what the name of your CSS document is.  

*NOTE*: When you saved your CSS document, be sure to record the name of the file* 

Open your HTML file in your browser and the CSS style sheet will automatically set the properties of your selectors in your HTML code.