CSS Flashcards

1
Q

how do you select elements by their class attribute?

A

write a period (.) character, followed by the name of the class

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

In CSS, how do you select elements by their tag name?

A

write a hashtag(#) character, followed by the id of the element.

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

how do you select an element by its id attribute?

A

write a hash (#) character, followed by the id of the element.

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

Name three different types of values you can use to specify colors in CSS.

A

RGB, HEX, HSL, RGBA, HSLA values.

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

What CSS properties make up the box model?

A

margins, borders, padding, and the actual content.

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

Which CSS property pushes boxes away from each other?

A

Margins

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

Which CSS property add space between a box content and its border?

A

padding

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

What is the default value for the position property of HTML elements?

A

The default value of the position property is static .

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

How does setting position: relative on an element affect document flow?

A

relative positioning doesn’t affect the layout,

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

How does setting position: relative on an element affect where it appears on the page?

A

it will have no effect on it’s positioning at all,

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

How does setting position: absolute on an element affect document flow?

A

Absolutely positioned elements are removed entirely from the document flow.

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

How does setting position: absolute on an element affect where it appears on the page?

A

The element is removed from the normal document flow, and no space is created for the element in the page layout. It is positioned relative to its closest positioned ancestor,

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

What are the four box offset properties?

A

op, left, bottom and right.

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