Question 1
What type of CSS framework provides pre-built utility classes to style HTML elements directly?
- Component-based CSS framework
- Utility-first CSS framework
- Semantic CSS framework
- Object-oriented CSS framework
- Grid-based CSS Framework
Question 2
Which of the following is a benefit of using a utility-first CSS framework?
- Reduced HTML size
- Faster initial page load
- Highly Customizable
- Automatic style updates
- Simplified JavaScript integration
Question 3
What are the main ways to integrate a utility-first CSS framework into a project?
- Using a CDN or linking a local CSS file
- Using a CDN or installing with a package manager
- Using a preprocessor or a CDN
- Using only a CSS file
- Embedding CSS in Javascript
Question 4
How can you apply text alignment to the left, center, or right in CSS using utility classes?
- Using classes like align-left, align-center, and align-right
- Using classes like float-left, float-center, and float-right
- Using classes like text-left, text-center, and text-right
- Using classes like justify-left, justify-center, and justify-right
- Using classes like pos-left, pos-center, and pos-right
Question 5
How can you create responsive margins and paddings in CSS using utility classes?
- Using media queries directly in the HTML
- Using responsive variants with margin and padding utility classes
- Using JavaScript to dynamically add margins and paddings
- Using CSS grid to manage spacing
- Using fixed pixel values for all margins and paddings
Question 6
Which of the following is NOT a typical advantage of using a utility-first CSS approach?
- Rapid development due to pre-built classes
- Highly customizable design through configuration files
- Smaller CSS file sizes by including only used classes
- Easier debugging of complex styling issues
- Simplified responsive design implementation
Question 7
What is the primary purpose of a utility-first CSS framework?
- To provide pre-designed components for quick UI creation
- To enable granular control over UI elements via pre-built classes
- To enforce a strict design system across a project
- To abstract CSS styling into reusable JavaScript modules
- To automate the generation of CSS from design mockups
Question 8
Consider the CSS utility class 'm-auto'. What does this class commonly achieve?
- Sets the margin to a fixed value
- Automatically calculates the font size
- Centers the element horizontally by setting left and right margins to auto
- Applies a default margin to all sides of the element
- Removes all margins from the element
Question 9
Which of the following is a valid way to add a 2rem margin to the top of an element, only on medium screens and larger, using a CSS utility framework?
- margin-top-md-8
- mt-md-2rem
- md:mt-8
- mtop-md-2
- margintop-medium-8
Question 10
In a utility-first CSS framework, what is the purpose of responsive prefixes like 'sm:', 'md:', 'lg:', and 'xl:'?
- To define the element's size in different units.
- To apply styles only when the browser is in dark mode.
- To apply styles based on the element's position in the DOM.
- To conditionally apply styles based on screen size or viewport width.
- To control the animation speed of an element.