Css Flashcards

1
Q

What are the names of the individual pieces of a CSS rule?

A

selector, properties, values

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

How are key/value pairs related to CSS?

A

manifest as property and value

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

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

A

hex values: #0000,
RGB color values: rgb(0.0,0),
HSL(hue, saturation, lightness)

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

What are three important considerations for choosing fonts?

A

readability, theme, target market

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

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

A

in case if it doesn’t work or doesn’t have that font

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, border, padding

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: pushes other stuff away

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

Which CSS property pushes box content away from its border?

A

padding: give more space within element itself

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

What purpose does the CSS Cascade serve?

A

to select CSS declarations in order

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

What is source order?

A

he order that your CSS rules are written

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

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

A

font-family, or global responsiveness

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

What is inheritance?

A

controls what happens when no value is specified for a property on an element

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

Why might CSS include this feature?

A

to save you from having to apply these properties to many elements

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

Is inheritance a good tool to use for styling? if so, on what occasions?

A

yes, for text

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

What is the purpose of !important?

A

to override styles that are declared somewhere else

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

When is !important a good tool to use?

A

NEVER

17
Q

What is specificity?

A

the means by which browsers decide which CSS property values are the most relevant to an element

18
Q

How is it calculated?

A

determined by the number of each selector type in the matching selector

19
Q

Why might CSS include this feature?

A

for source order, to have other ways to style

20
Q

What is the order of selector strengths for CSS specificity, referred to as the Specificity Hierarchy?

A

Inline style attributes, ID attributes, classes and pseudo classes, elements and pseudo elements, *

21
Q

What is the CSS Cascade?

A

styles can fall from one style sheet to another. all factors that CSS uses

22
Q

What are CSS pseudo-classes useful for?

A

gives us styling responsible for events

23
Q

What does the transform property do?

A

adjust visually on page

24
Q

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

A

first selects the first element after the parent and last selects the last element of the group

25
Q

What are 3 examples of what can be done with CSS transitions?

A

scale, rotate, delay

26
Q

Why might transitions be a helpful effect for styling?

A

create animation or ups the user friendliness

27
Q

Are all properties able to be transitioned?

A

No

28
Q

How do block level elements affect the document flow?

A

by always beginning on a new line and take up full space of line

29
Q

How do inline elements affect the document flow?

A

can start anywhere in a line

30
Q

What are the default width and height of a block level element?

A

100% for width and height same as element or auto

31
Q

What are the default width and height of an inline element?

A

auto

32
Q

What accessibility considerations must be considered when choosing HTML elements?

A

good SEO, easier to develop with, for screen readers

33
Q

What is the initial display property of

?

A

block

34
Q

What is the difference between display:none and visibility: hidden?

A

display:none is hidden and takes no space while visibility:hidden is not visible but gets it’s original space

35
Q

What is the difference between the block, inline block, and inline display?

A

inline-causes a block level element to act like an inline element
block-causes an inline element to act like a block level element
inline block-causes a block level element to flow like an inline element while retaining other features of a block level element

36
Q

Why are CSS resets helpful to cross browser compatibilty?

A

allow the developer to create changes within a global HTML sequence and to ensure universal uniformity

37
Q

Why is it important to be mindful of what you reset with your CSS resets?

A

for others you are potentially working to not have an issue

38
Q

What is an argument against using CSS resets?

A

a lot of the styles are eventually overridden by the main stylesheet anyways