Summary 3

Chapter 2

Topic 1: Rule Selectors

A rule is a CSS style instruction that is completed and a selector is the element that the rule states it selects. In these rule selectors, there are declarations you make to to change a property and that properites value. A selection would be followed with a curly bracket and a declaration can be made afterwards. Each declaration is followed by a semicolon. A rule selector example would be:

p{

color:red;

}


Topic 2: Cascade, Inheritance, and Specifity

Inheritance refers to values of CSS properties. If a property, like body, is an ancestor instead of a descent, the propery of that ancestor is passed on to all of its descents. Cascade refers to how a browser will interept what style to display on the screen. The order of style sheets a browser will go through are as follows: default browser sheet, user style sheet, author style sheets, author embedded styles, and author inline styles. The browser will go through these in the order that is listed. There are rules that cascade abide by, which are find all declarations of each element and property, sort by order and weight, sort by specifity, and sort by order.


Topic 3: Numerical and Keyword Options

These options pertain to the values you can use for declarations. These values fall into three main types: word values, numerical values, and color values. Word values contains several values one category, but some good examples could be solid,rounded, or dashed for the border property. Numerical values are value that define something by numbers like height or width. You can use absolute or relative values to describe height. Color values refer to the color or a property. You can do this by just adding the name of a color or by typing in a hex code for a color, which is more recommended.