CSS Flashcards
1
Q
What is the Box Model in CSS?
A
Every element creates one or more rectangular element boxes, which houses the
content.
2
Q
Give the reasons for using CSS (4)
A
- To separate the presentation from the data
- Allows for much richer document appearance than (x)HTML alone
- Allows for easy modification of the web page. Everything is in one place
- Can improve load times. It stores the presentation concerns in one place, instead
of being repeated throughout the document.
3
Q
Describe the CSS box model
A
Every element creates one or more rectangular element boxes, which houses the
content. The element is surrounded by optional amounts of padding, borders and
margins.
e.g. [margin [border [padding [content]padding ] border ]margin ]
4
Q
List the main CSS selectors
A
.class .intro Selects all elements with class=”intro”
#id #firstname Selects the element with id=”firstname”
* * Selects all elements
element p Selects all <p> elements</p>