There are different ways you can incorporate CSS into your website. You can link to an external CSS file, you can write CSS directly in the head of your page by using style tags, or you can write CSS as an attribute of an element. We will focus on creating our CSS in a separate CSS file (the best option for multi-page sites)
To link to a separate css file you fould first create a new file and save it win your website folder. You will need to save this file as a .css filetype. For example, "style.css".
Then, in your HTML, include a link to this file in between your <head> tags. If the css file is in the same folder as your index page, the link should be written as follows: <link href="style.css" type="text/css" rel="stylesheet">
Let's break down the attributes in this new link element used to incorporate style in our sites:
in HTML:
<html> <head> <title>Introduction to CSS </title> <link href="style.css" type="text/css" rel="stylesheet" /> </head> <body> </body> </html>Selectors