More CSS: Colors, Text and Pseudo-classes

Course Topics by Week 
1. Intro to HTML 56. Page Layout with CSS
2. More HTML 57. HTML Tables
3. Developing a Web Site8. HTML Forms
4. Styling with CSS9. Multimedia
5. Midterm Quiz10. Review and Term Project
 11. Final Quiz

Contents

 

Introduction

Defining Colors

W3Schools tutorial on CSS color properties

 

Hexadecimal numbers

One of the ways to represent colors in CSS styles is using the base 16 number system, hexadecimal, or "hex". The hex number system uses the digits 0 through 9 (ten digits) along with the letters A through F (six digits) for a total of sixteen digits. This is how you count in hexadecimal:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 2A, 2B, 2C, 2D, 2E, 2F, etc.

Here are examples of hex values and their decimal equivalents:

Math is Fun: Hexadecimal Number Tutorial

 

Text and font styles

Text Properties

Font Properties

Web Fonts

Web fonts allow developers to use fonts that may not be installed on end user's computers.

 

List Style Properties

Pseudo-Classes

Use these to define special appearance or behavior for HTML elements.
The syntax of the selector is similar to that of a class selector.

Read about more about pseudo-classes on W3 Schools.

 

Example

References


Creative Commons License Web Authoring Lecture Notes by Brian Bird are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.