CSS Flashcards

1
Q
  • What are the names of the individual pieces of a CSS rule?
A

a rule set consists of a selector, the declaration, and inside the declaration goes the property and the given value

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 theirclassattribute?

A

.class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  • In CSS, how do you select elements by their type?
A

state the element type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  • In CSS, how do you select an element by itsidattribute?
A

id

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

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

A

RGB, Hex Code, Color

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  • What CSS properties make up the box model?
A

margin, padding, border, width, height

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  • Which CSS property pushes boxes away from each other?
A

margin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  • Which CSS property add space between a box’s content and its border?
A

padding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  • What is a pseudo-class?
A

is a kind of class that is executed by the browser when an action is performed, hovered, submit, click, etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  • What are CSS pseudo-classes useful for?
A

they are useful when trying to change the appearance of elements when user interacts with them

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  • Name two types of units that can be used to adjustfont-sizein CSS.
A

pixels, percentage, or rem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  • What CSS property controls the font used for the text inside an element?
A

font-family

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  • What is the defaultflex-directionof aflexcontainer?
A

row, left to right

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  • What is the defaultflex-wrapof aflexcontainer?
A

all on one line AKA nowrap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  • Why do two div elements “vertically stack” on one another by default?
A

because div elements are block elements so they take up all available space

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  • What is the defaultflex-directionof an element withdisplay: flex?
A

row left to right

17
Q
  • What is thedefaultvalue for thepositionproperty of HTML elements?
A

static

18
Q
  • How does settingposition: relativeon an element affect document flow?
A

it doesn’t change document flow

19
Q
  • How does settingposition: relativeon an element affect where it appears on the page?
A

relative to original position, changes according box offset

20
Q
  • How does settingposition: absoluteon an element affect document flow?
A

no longer part of document flow

21
Q
  • How does settingposition: absoluteon an element affect where it appears on the page?
A

it stays put in absolute position regardless, viewfinder may increase or decrease but position will stay

22
Q
  • How do you constrain an absolutely positioned element to a containing block?
A

you have to set parent div to relative position

23
Q
  • What are the four box offset properties?
A

top, right, bottom, left

24
Q

Give two examples of media features that you can query in an @media rule.

A

min-width & max-width

25
Q

Which HTML meta tag is used in mobile-responsive web pages?

A

name = viewport