Lecture Notes

Section 1: Introduction

Course Objectives

Section 2: CSS Development

Introduction to CSS
Parts of a CSS Rule
Types of CSS Rules
CSS - Color Names and Codes
CSS Classes and Spans
CSS Divisions - DIVs
CSS IDs
CSS Margins
CSS Padding
CSS Text Properties
CSS Font Properties
CSS Borders
CSS Backgrounds
CSS Transparency
CSS Text on Top of Images
CSS Width and Height Properties
CSS Display Properties
CSS Static Positioning
CSS Relative Positioning
CSS Absolute Positioning
CSS Fixed Positioning
CSS Float Property
CSS Clear Property
CSS Z-Index
CSS Styling Links
CSS Tables
CSS Project - Introduction
CSS Project - CSS Rules
CSS Project - Navigation Rules
CSS Project - Responsive CSS
CSS Project - Page Elements
×
More

Lecture Notes

Course: CSS Fundamentals View Course Outline


Created by:

YouAccel

Lectures:

32

Duration:

1h 47m 20s

Skill Level:

Beginner

Language:

English

Students Enrolled:

11,062

Rating:

(86)

Certification Type:

Completion Certificate

Lecture: CSS - Color Names and Codes

When working with colors in CSS, it's important to know that all colors displayed on the screen are produced by combining Red, Green and Blue also known as the RGB color spectrum.

We can set colors in CSS using color names, RGB color codes, or Hexadecimal values.

This html document provides an example of all three.

Our style sheet has three rules, that will apply font coloring to any <h1>, <h2>, and <h3> elements.

The <h1> style rule uses a color name, red.

The <h2> style rule, uses a hexadecimal code, which represents light blue.

The <h3> style rule, uses an rgb color code that represents a light purple color.

We've referenced each of these rules in our html <body>.

We can see in our browser, that each style rule has been successfully applied.

In order to get color codes and hexadecimal values, we can use a number of free online tools.

colorpicker.com, is one such example.

Here we can browser through a color palette and retrieve the corresponding code values.