CSS General Flashcards

(84 cards)

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
What property defines multiple steps in an animation?
@keyframe
26
What property enables a flex container?
display: flex
27
What property defines the direction of flex items?
flex-direction
28
What property aligns items along the main axis in a flex container?
justify-content
29
What property aligns items along the cross axis in a flex container?
align-items
30
What property defines the column structure of a grid layout?
grid-template-columns
31
What property defines the row structure of a grid layout?
grid-template-rows
32
What property defines the gap between rows and columns in a grid or flex container?
gap
33
What property sets the space between letters?
letter-spacing
34
What property sets the space between lines of text?
line-height
35
What property changes the horizontal alignment of text?
text-align
36
What property prevents text from wrapping?
white-space: nowrap
37
What property transforms the case of text (uppercase, lowercase, etc.)?
text-transform
38
What selector targets the first child of a parent?
:first-child
39
What CSS rule is used to apply styles based on screen size or device conditions?
@media
40
What unit represents 1% of the width of the viewport?
vw
41
What property adds blur, brightness, or grayscale effects to an element?
filter
42
What property determines how styles transition (e.g., linear or ease-in)?
transition-timing-function
43
What property defines how long a transition should take?
transition-duration
44
What property sets which keyframes animation to use?
animation-name
45
What property defines how many times an animation should repeat?
animation-iteration-count
46
What property defines whether the animation plays forward, backward, or alternates?
animation-direction
47
What property delays the start of the animation?
animation-delay
48
What CSS property controls whether a flex item grows relative to the rest?
flex-grow
49
What property sets the base size of a flex item before growing or shrinking?
flex-basis
50
What property aligns a flex item independently of the container's alignment?
align-self
51
What syntax is used to define a custom property (CSS variable)?
--custom-property
52
What function is used to retrieve the value of a custom property?
var()
53
What property defines the thickness, style, and color of an element’s border?
border
54
What property sets the thickness of a border?
border-width
55
What property adds a line around an element without taking space?
outline
56
What property changes how width and height are calculated with padding and border?
box-sizing
57
What property controls whether the backface of an element is visible during transformations?
backface-visibility
58
What selector targets all elements on the page?
*
59
What selector targets a direct child of an element?
>
61
What selector targets an element only if it’s the only one of its type?
:only-of-type
62
What property makes an element partially transparent?
opacity
63
What property controls how an image fits in its container?
object-fit
64
What property controls the position of a background image?
background-position
65
What property prevents background images from repeating?
background-repeat
66
What property sets how the browser should render a font (e.g., smoothing)?
font-smooth (non-standard)
67
What rule targets print media in CSS?
@print media
68
What property removes the list bullets from a `
    ` or `
      `?
list-style
69
What property collapses adjacent borders in a table?
border-collapse
70
What property clips content that exceeds the bounds of its container?
clip
71
What property allows horizontal or vertical scroll within an element?
overflow-x / overflow-y
72
What property controls whether a sticky element scrolls inside its container?
position
73
What property prevents clicks and interactions with an element?
pointer-events
74
What property allows you to blur or color the area behind an element?
backdrop-filter
75
What function returns one of two values based on a condition?
@supports
76
What pseudo-element targets the entire scrollbar in WebKit-based browsers?
::-webkit-scrollbar
77
What media feature is used to detect if the user prefers a dark color scheme?
@media (prefers-color-scheme: dark)
78
What property disables selection of text with a mouse or keyboard?
user-select
79
What rule lets you style elements based on their container’s size?
@container
80
What property defines how a container’s size should be measured (inline vs block)?
container-type
81
What unit allows responsive layouts based on a container’s width?
cqw
82
What property explicitly defines a named grid line in a grid layout?
grid-template-areas
83
What selector targets a parent when one of its children has focus (in JS polyfill)?
:has() (currently supported in some browsers)
84
What property defines a minimum width for an element?
min-width