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
From the course: CSS Essential Training
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,…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
CSS specifications and the W3C2m 35s
-
(Locked)
CSS syntax and terminology3m 29s
-
(Locked)
CSS data types2m 42s
-
(Locked)
Type and universal selectors3m 2s
-
(Locked)
ID selectors1m 53s
-
(Locked)
Class selectors3m 39s
-
(Locked)
Combinators and selector lists3m 3s
-
(Locked)
Pseudo-classes and pseudo-elements3m 22s
-
(Locked)
Inheritance, cascade, and specificity4m 55s
-
(Locked)
Custom properties4m 42s
-
(Locked)
Referencing CSS3m 28s
-
(Locked)
Project: Create a CSS file4m 32s
-
(Locked)
-
-
-
-
-
-
-
-