From the course: CSS Shorts

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Create variables

Create variables - CSS Tutorial

From the course: CSS Shorts

Create variables

- [Instructor] Hi, this is Chris Converse, and in this episode, we'll take a look at using CSS variables, which are technically referred to as custom properties. These properties allow us to define some values, then reuse those values anywhere in our CSS file, allowing you to more efficiently applies styles to your webpage. Now, at the time of this recording, Internet Explorer 11 is the only browser that does not support this feature at all, and since we'll be using the basic properties, without calculations or animations, the browser support is even higher than what's listed here. So, if you'd like to follow along, download the exercise files, and let's begin by opening the HTML file in a text editor. Now, with the HTML file open, up in the head area, with the link to style.css, we'll be opening this in a moment. If we continue down in the HTML file, inside of the body area, we have a header and a main element. Inside of the main element is a section, an article. And then we have…

Contents