CSS Flashcards

1
Q

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

A
  1. RGB values
  2. Hexcode values
  3. Color names
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are three important considerations for choosing fonts?

A

Possible answers:

  • A browser will usually only display the font if it’s installed on the user’s computer
  • Important to have a fallback option just in case
  • typefaces are usually subject to copyright, so be careful to not infringe said copyright
  • Remember to check what the fonts look like on Macs vs PC
  • Readability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why must you have backup fonts assigned when selecting custom fonts?

A

Just in case the browser doesn’t support the first choice font

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

What CSS properties make up the box model?

A
  • Margin
  • Border
  • Padding
  • Content
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
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
6
Q

Which CSS property pushes box content away from its border?

A

Padding

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

What purpose does the Cascade serve?

A

the CSS “Cascade” is the process which the CSS language determines what styling should ultimately be applied to an element

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

What is source order?

A

The order that your CSS rules are written in your stylesheet

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

In what situations might you need to apply styling to a single element multiple times in one stylesheet?

A

Mobile responsiveness mainly

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

What is inheritance?

A

Inheritance is when the child element takes on the values that the parent/grandparent elements have

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

What is the purpose of !important?

A

!important overrides styles that have been declared elsewhere in your CSS or inline HTML styling

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

When is !important a good tool to use?

A

As little as possible, because using it too much would result in your stylesheet being overrun by !important tags

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

When is !important a good tool to use?

A

As little as possible, because using it too much would result in your stylesheet being overrun by !important tags

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

What is the CSS Cascade?

A

The process of determining the order/priority of the CSS that gets applied

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

What does the transform property do?

A

The transform property allows you to visually manipulate an element by skewing/rotating/translating/scaling

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

What is the difference between the :first-child and the :last-child pseudo selector?

A

:first-class represents the very first element among a group of sibling elements, while the :last-class pseudo class represents the very last

17
Q

What is the difference between the :first-child and the :last-child pseudo selector?

A

:first-class represents the very first element among a group of sibling elements, while the :last-class pseudo class represents the very last

18
Q

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

A

Static

19
Q

How does the setting position relative on an element affect document flow and where the element appears on the page?

A

The element will move in relation to where it would have been in a normal, static, flow.

20
Q

How does setting position absolute on an element affect document flow and where the element appears on the page?

A

The element will be completely taken out of normal flow and will not affect or be affected by the position of any other element on the page

21
Q

What are the box offset properties?

A

Top, bottom, left, right

22
Q

What are the box offset properties?

A

Top, bottom, left, right

23
Q

What is the default flex-direction of a flex container?

A

Row

24
Q

what is the default flex-wrap of a flex container?

A

No wrap

25
Q

What were floats originally designed for?

A

Newspaper/Magazine layouts

26
Q

What are clears for with floats?

A
The clear property allows you
to say that no element (within
the same containing element)
should touch the left or righthand
sides of a box.
27
Q

What are some of the downsides for using floats in layout design?

A

Floats are generally meant for pictures AND text, so relying on floats usually gets tricky

28
Q

Why should flexbox not be used for building complete web page layouts?

A

Flexbox is best for a few items for a smaller portion of the page, instead of the entire web page.

29
Q

Why is it important to use a grid system for CSS Layouts?

A

It makes sizing more consistent, and if you are working with others, its easier for each other to see/discern the shared work.

30
Q

What are the three core parts of a grid system?

A

Container, row, column

31
Q

Why is it a good idea to use percentages for grid column widths?

A

Percentages keep the format proportional to each other and mobile responsive