Introduction to CSS Lars Larsson Today XHTML tree model CSS syntax Measurement units Selectors Colours Fonts and text Summary
Introduction to CSS
Lars Larsson Lecture #3
Introduction to CSS Lars Larsson Today XHTML tree model CSS syntax Measurement units Selectors Colours Fonts and text Summary
1 XHTML tree model 2 CSS syntax 3 Measurement units 4 Selectors 5 Colours 6 Fonts and text 7 Summary
Introduction to CSS Lars Larsson Today XHTML tree model CSS syntax Measurement units Selectors Colours Fonts and text Summary
XHTML tree model
Computer scientists love trees! However, we consider a tree to be a data structure consisting of nodes in a hierarchy. Nodes are related to each other as ancestors and offspring. Nodes without offspring are called leaves. Nodes without ancestors are called root nodes. Child nodes with a common parent node are called siblings.
Introduction to CSS Lars Larsson Today XHTML tree model CSS syntax Measurement units Selectors Colours Fonts and text Summary
XHTML trees continued
There are many types of trees in computer science, but we will
- nly deal with the kind that can be used to represent an
XHTML document. In this case, children are ordered. Thus, we can state that child A comes before child B. If the children were unordered, we would not be able to do so. This tree concept will be very important in both CSS and JavaScript.
Introduction to CSS Lars Larsson Today XHTML tree model CSS syntax Measurement units Selectors Colours Fonts and text Summary
XHTML trees example
The following figure shows how we might represent a very simple web page as a tree. Think about the relationship between nodes!
Introduction to CSS Lars Larsson Today XHTML tree model CSS syntax Measurement units Selectors Colours Fonts and text Summary
CSS basics
The principle of CSS is to allow us to select certain elements in
- ur XHTML tree, and declare new values for properties related