Q91
Q91 How can you make text italic in CSS?
font-style: italic;
text-style: italic;
font-weight: italic;
style: italic;
Q92
Q92 How do you specify a fallback font in CSS?
font-family: "Helvetica", "Arial", sans-serif;
font-family: "Helvetica" or "Arial";
font-family: primary: "Helvetica", secondary: "Arial";
font: "Helvetica", "Arial";
Q93
Q93 Why might text not appear in the specified font-family in CSS?
The font is not installed on the user's system
The browser does not support the font
The font-family is misspelled
All of the above
Q94
Q94 What could cause the text-transform property to not work as expected?
Incorrect property value
The property is applied to a non-text element
Inheritance issues
Both A and C are correct
Q95
Q95 How can you fix text that overflows its container?
Use the overflow property
Apply text-overflow: ellipsis;
Increase the container size
Both B and C are correct
Q96
Q96 How do you remove the default list-style-type from an unordered list?
list-style-type: none;
list-style: no-bullet;
list-style: none;
list-bullet: none;
Q97
Q97 Which property is used to specify the space between cells in a table?
cell-spacing
cell-padding
border-spacing
padding
Q98
Q98 How can you make a table's borders collapse into a single border?
border-collapse: collapse;
border-style: collapse;
table-border: single;
border: single;
Q99
Q99 What CSS property is used to control the list item marker type in an ordered list?
list-style-type
list-item-type
list-marker-type
list-number-type
Q100
Q100 How do you align text to the right in table headers?
Q101
Q101 Which CSS property is used to set the style of the bottom border of a table cell?
border-bottom-style
cell-border-bottom
table-cell-border
border-style-bottom
Q102
Q102 How do you set the background color for all elements in a table?
th { background-color: #eee; }
table th { color: #eee; }
th { color: background; }
table { th-background: #eee; }
Q103
Q103 How can you style every alternate row of a table to have a gray background?
tr:nth-child(even) { background-color: #eee; }
tr:even { background-color: #eee; }
table tr:nth-of-type(even) { background-color: #eee; }
tr:nth-row(even) { background-color: #eee; }
Q104
Q104 How do you apply a border to only the left side of a table cell?
td { border-left: 1px solid black; }
td: border { left: 1px solid black; }
td { left-border: 1px solid black; }
table-cell { border-left: 1px solid black; }
Q105
Q105 Why might a table's borders not be visible even after setting border:
1px solid black;?
The border-collapse property is not set
The border color matches the background color
The border style is not specified correctly
All of the above
Q106
Q106 What could cause list item markers to not appear in an unordered list?
Setting list-style-type: none;
The list is inside a container with overflow: hidden;
Incorrect use of the ul element
Both A and B are correct
Q107
Q107 How can you fix the issue of table cells not aligning properly with their headers?
Ensure the number of cells matches the number of headers
Set explicit widths on headers and cells
Use vertical-align to align cell content
Both A and B are correct
Q108
Q108 What is the purpose of CSS transitions?
To change property values smoothly over a given duration
To create movement using keyframes
To pause animations
To manipulate images
Q109
Q109 Which property is essential for defining the duration of a CSS transition?
transition-duration
transition-property
transition-timing-function
transition-delay
Q110
Q110 What does the animation-direction property do?
Determines the speed curve of the animation
Specifies whether the animation should play in reverse on alternate cycles
Defines how many times an animation should play
Specifies the name of the @keyframes animation
Q111
Q111 How do you specify the timing function of a transition?
Using the transition-timing-function property
With the transition-duration property
By setting the transition-delay property
Through the animation-timing-function property
Q112
Q112 What is the difference between CSS transitions and animations?
Transitions require a trigger, like a hover, whereas animations do not
Animations can only be applied to :hover states
Transitions can manipulate SVGs, but animations cannot
There is no difference; they are interchangeable
Q113
Q113 Which CSS property allows you to delay the start of a transition?
transition-delay
animation-delay
transition-duration
animation-duration
Q114
Q114 How do you apply a basic opacity transition to an element on hover?
.element:hover { transition: opacity 0.5s ease; opacity: 0.5; }
.element { transition: opacity 0.5s ease-in-out; } .element:hover { opacity: 0.5; }
.element { opacity: 1; } .element:hover { opacity: 0.5; transition: 0.5s; }
All of the above
Q115
Q115 How can you make an animation loop infinitely?
animation-iteration-count: infinite;
animation-repeat: forever;
animation-loop: infinite;
animation-duration: infinite;
Q116
Q116 What feature do keyframe animations offer that transitions do not?
Triggering without user interaction
Requiring a hover state
Dependence on JavaScript
Limitation to transform properties
Q117
Q117 What is a potential downside of setting a transition duration to 0s?
Makes the transition instant and potentially jarring
Prevents the transition from running
Is the recommended practice for subtle effects
None, it optimizes performance
Q118
Q118 How can you troubleshoot an animation that does not start?
Ensure the @keyframes rule is correctly defined
Check that the animation name matches the @keyframes name
Verify the animation-duration is not set to 0s
All of the above
Q119
Q119 What could be the reason for an animation to run once and not repeat despite using animation-iteration-count: infinite;?
The animation is not linked to the correct element
The browser does not support infinite animations
A syntax error in the @keyframes definition
The animation-name property is missing or incorrect
Q120
Q120 What is a CSS pseudo-class?
A special class added to elements via JavaScript
A class that targets specific states of an element
A syntax for defining default styles
A method to style elements based on their content type