CSS General Flashcards

1
Q

What CSS property is used to set the size of the text?

A

font-size

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

What property controls the space outside of an element’s border?

A

margin

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

What property controls the space inside an element’s border?

A

padding

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

What property sets the color of text?

A

color

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

What property sets the background color of an element?

A

background-color

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

What CSS property makes text bold?

A

font-weight

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

What property changes the style of the font to italic?

A

font-style

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

What property changes the font of the text?

A

font-family

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

What property hides an element from the page layout?

A

display:none

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

What property controls whether an element is visible or not, without affecting layout?

A

visibility

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

What CSS property is used to change the positioning type of an element?

A

position

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

What property is used to layer elements over one another?

A

z-index

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

What property allows an element to float to the left or right?

A

float

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

What property is used to clear floats?

A

clear

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

What CSS property is used to set the width of an element?

A

width

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

What property sets the height of an element?

A

height

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

What CSS property forces an element to create a new block formatting context?

A

overflow

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

What CSS function allows mathematical expressions to determine values dynamically?

A

calc()

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

What CSS function allows a responsive range between min, preferred, and max values?

A

clamp()

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

What CSS property sets the background to a smooth gradient?

A

background-image

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

What CSS property adds shadow to text?

A

text-shadow

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

What CSS property adds shadow to boxes or elements?

A

box-shadow

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

What property makes the corners of an element rounded?

A

border-radius

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

What CSS property allows transitions between property changes?

A

transition

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

What property defines multiple steps in an animation?

A

@keyframe

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

What property enables a flex container?

A

display: flex

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

What property defines the direction of flex items?

A

flex-direction

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

What property aligns items along the main axis in a flex container?

A

justify-content

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

What property aligns items along the cross axis in a flex container?

A

align-items

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

What property defines the column structure of a grid layout?

A

grid-template-columns

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

What property defines the row structure of a grid layout?

A

grid-template-rows

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

What property defines the gap between rows and columns in a grid or flex container?

A

gap

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

What property sets the space between letters?

A

letter-spacing

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

What property sets the space between lines of text?

A

line-height

35
Q

What property changes the horizontal alignment of text?

A

text-align

36
Q

What property prevents text from wrapping?

A

white-space: nowrap

37
Q

What property transforms the case of text (uppercase, lowercase, etc.)?

A

text-transform

38
Q

What selector targets the first child of a parent?

A

:first-child

39
Q

What CSS rule is used to apply styles based on screen size or device conditions?

40
Q

What unit represents 1% of the width of the viewport?

41
Q

What property adds blur, brightness, or grayscale effects to an element?

42
Q

What property determines how styles transition (e.g., linear or ease-in)?

A

transition-timing-function

43
Q

What property defines how long a transition should take?

A

transition-duration

44
Q

What property sets which keyframes animation to use?

A

animation-name

45
Q

What property defines how many times an animation should repeat?

A

animation-iteration-count

46
Q

What property defines whether the animation plays forward, backward, or alternates?

A

animation-direction

47
Q

What property delays the start of the animation?

A

animation-delay

48
Q

What CSS property controls whether a flex item grows relative to the rest?

49
Q

What property sets the base size of a flex item before growing or shrinking?

A

flex-basis

50
Q

What property aligns a flex item independently of the container’s alignment?

A

align-self

51
Q

What syntax is used to define a custom property (CSS variable)?

A

–custom-property

52
Q

What function is used to retrieve the value of a custom property?

53
Q

What property defines the thickness, style, and color of an element’s border?

54
Q

What property sets the thickness of a border?

A

border-width

55
Q

What property adds a line around an element without taking space?

56
Q

What property changes how width and height are calculated with padding and border?

A

box-sizing

57
Q

What property controls whether the backface of an element is visible during transformations?

A

backface-visibility

58
Q

What selector targets all elements on the page?

59
Q

What selector targets a direct child of an element?

60
Q

What selector targets all <a> tags that have been visited?</a>

61
Q

What selector targets an element only if it’s the only one of its type?

A

:only-of-type

62
Q

What property makes an element partially transparent?

63
Q

What property controls how an image fits in its container?

A

object-fit

64
Q

What property controls the position of a background image?

A

background-position

65
Q

What property prevents background images from repeating?

A

background-repeat

66
Q

What property sets how the browser should render a font (e.g., smoothing)?

A

font-smooth (non-standard)

67
Q

What rule targets print media in CSS?

A

@print media

68
Q

What property removes the list bullets from a <ul> or <ol>?

A

list-style

69
Q

What property collapses adjacent borders in a table?

A

border-collapse

70
Q

What property clips content that exceeds the bounds of its container?

71
Q

What property allows horizontal or vertical scroll within an element?

A

overflow-x / overflow-y

72
Q

What property controls whether a sticky element scrolls inside its container?

73
Q

What property prevents clicks and interactions with an element?

A

pointer-events

74
Q

What property allows you to blur or color the area behind an element?

A

backdrop-filter

75
Q

What function returns one of two values based on a condition?

76
Q

What pseudo-element targets the entire scrollbar in WebKit-based browsers?

A

::-webkit-scrollbar

77
Q

What media feature is used to detect if the user prefers a dark color scheme?

A

@media (prefers-color-scheme: dark)

78
Q

What property disables selection of text with a mouse or keyboard?

A

user-select

79
Q

What rule lets you style elements based on their container’s size?

A

@container

80
Q

What property defines how a container’s size should be measured (inline vs block)?

A

container-type

81
Q

What unit allows responsive layouts based on a container’s width?

82
Q

What property explicitly defines a named grid line in a grid layout?

A

grid-template-areas

83
Q

What selector targets a parent when one of its children has focus (in JS polyfill)?

A

:has() (currently supported in some browsers)

84
Q

What property defines a minimum width for an element?