CSS Flashcards

1
Q

What is the CSS box model?

A

The CSS box model is essentially a box that wraps around every HTML element.

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

What does the CSS box model consists of?

A
  1. Content
  2. Padding
  3. Border
  4. Margin
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe the content portion of the CSS box model.

A

The content of the box, where text and images appear

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

Describe the padding portion of the CSS box model.

A

Clears an area around the content. The padding is transparent. Order of padding is as follows: top, right, bottom, left (Clockwise).

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

Describe the border portion of the CSS box model.

A

A border that goes around the padding and content.

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

Describe the margin portion of the CSS box model.

A

Clears an area outside the border. The margin is transparent.

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

Describe the overflow property.

A

The overflow property specifies what should happen if content overflows an element’s box.

This property specifies whether to clip content or to add scrollbars when an element’s content is too big to fit in a specified area.

Note: The overflow property only works for block elements with a specified height.

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

What are selectors in CSS?

A

In CSS, selectors are patterns used to select element(s) you want to style.

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

What are some examples of selectors in CSS?

A
  1. Class selector (.class)
  2. Id selector (#id)
  3. Star selector (*)
  4. Attribute selector ([attribute])
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the class selector in CSS do?

A

The class selector in CSS selects all elements with class.

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

What does the id selector in CSS do?

A

The id selector in CSS selects all elements with id.

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

What does the star selector in CSS do?

A

The star selector selects all elements.

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

What does the attribute selector in CSS do?

A

The attribute selector selects all elements with a target attribute.

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

What is border-style in CSS?

A

The border style property allows you to change the style of your border. An example of this could be dashed, which would set your border to a series of dashes.

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

Describe display overflow in CSS

A

The overflow property specifies what should happen if content overflows an element’s box.

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