From the course: CSS Essential Training

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Project: Create a CSS file

Project: Create a CSS file

- [Instructor] Now that we've completed the project prep and HTML updates, the next step is to set up our CSS. The template already included a CSS file, but we still need to attach it to the HTML file. Scroll up to the head section to add the link tag. This can be included anywhere within the head section, but I like to add it under title. Let's use the auto complete feature again. Type the element name, link, and press tab. This is a void element so it doesn't need a closing tag. Inside the quotes of the href value, we'll add the path to the CSS file, starting with CSS for the folder name, a forward slash, then the file name styles.css. Then save the file and open the CSS file. To make sure we've linked to the file properly, let's add a style that you can't miss, like changing the pages background color. We'll use body to select the entire webpage. Then add the curly brackets. Just like code pin when you press enter or return,…

Contents