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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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 ]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly