Finish CSS, PHP Intro




CS174

Chris Pollett

Feb 17, 2021

Outline

Introduction

Class selectors

ID Selectors

Reset Styles, !important

Pseudo Classes

What values can a property have?

Color, Fonts, and Text Decoration

Colors
  • You should remember when specifying colors that they might look different on different machines / monitors. There is a list of 216 so called web-safe colors on Wikipedia.
  • To specify the foreground color of a tag you can set the color property. For example, div.changed {color: red} <div class="changed"><p>first paragraph that's new</p><p>2nd...</p></div>
  • To specify the background you use the background-color property
Fonts
There are several properties of fonts that you can control.
  • font-family (examples: Arial, Times, Courier)
  • font-size (examples: 20pt, 15px, xx-small, x-small, small, medium, large, smaller, larger, etc)
  • font-style (example: italic, oblique)
  • font-weight (example: bold, bolder)
Text-Decoration
The text-decoration property can be further used to control how text looks. Some values are line-through, overline, underline, and none.

In-Class Exercise

List Properties

Alignment of Text

Box Model

More on the Box Model

Background Images

Position and Display Properties

Keyboard Shortcuts

Introducing PHP