Understanding Tailwind's Customization
Which of the following best explains how to add a new custom color called 'brand-blue' to the Tailwind palette for use as a text color in your project?
- A. Add 'brand-blue' to the theme.colors in tailwind.config.js and use it with classes like text-brand-blue
- B. Insert 'brand-blue' directly in your HTML using the style attribute
- C. Modify the main.css file to define a .brand-blue class and use text-purple
- D. Customize the core.css file and reference text-blue
- E. Change the HTML u003Cbodyu003E tag to have color='brand-blue'
Responsive Utility Syntax
If you want to add top padding of 32px only on medium and larger screens using Tailwind CSS, which class should you use?
- A. pt-8
- B. md:pt-8
- C. sm:pt-8
- D. pt-md-8
- E. padt-md-8
Flexbox Centering Technique
Given a u003Cdivu003E container, how can you use Tailwind CSS utilities to center its child both vertically and horizontally?
- A. flex justify-center items-center
- B. block align-center
- C. flex-center justifyitems-center
- D. flex align-middle center-content
- E. container-center flex-items-center
Purge Option and Optimization
What is the main function of the 'purge' (or 'content') option in Tailwind's configuration file?
- A. To remove unused utility classes and minimize the generated CSS file
- B. To enable dark mode
- C. To apply custom fonts
- D. To reset the browser stylesheet
- E. To extend media query breakpoints
Just-in-Time Compilation
How does Tailwind CSS's Just-in-Time (JIT) mode improve development and production workflow?
- A. By generating CSS for only the classes used in your source files at build or serve time
- B. By loading all possible classes in advance and increasing file size
- C. By compiling CSS on the server after every user visit
- D. By updating the browser stylesheet every second
- E. By embedding classes inline within JavaScript files
Dark Mode Configuration
Which approach allows you to enable dark mode styling in a Tailwind CSS project?
- A. Setting darkMode: 'media' in tailwind.config.js and using dark: utility classes
- B. Adding a u003Cdarku003E tag in HTML
- C. Using the class text-dark-mode on elements
- D. Changing body color to #000
- E. Setting darkMode: true with no additional changes
Applying the @apply Directive
Which statement correctly explains the role of the @apply directive in Tailwind CSS?
- A. It allows you to compose multiple utility classes into a single custom CSS class
- B. It imports external CSS files into your project
- C. It checks whether all utilities are used
- D. It applies CSS only to hover states
- E. It removes duplicate utility classes automatically
Responsive Card Layout Construction
Which set of Tailwind CSS classes would best create a basic card layout that is responsive for different screen sizes?
- A. w-full rounded shadow p-4 md:w-1/2
- B. blockcard shadow-lg m-4 xs:pl-2
- C. card-box rounded-xl width-100 pb-4 sm:ml-4
- D. row-card shadow-md px-8 md:px-16
- E. card:responsive flexbox-1 py-10
Grid Layout Utilities
Suppose you want to create a 3-column grid with 16px gap between columns in Tailwind CSS. Which combination of classes would achieve this layout?
- A. grid grid-cols-3 gap-4
- B. flex grid-3col gap-t-16
- C. grid-col-3 grid-gap-4
- D. flex-cols-3 space-x-4
- E. grid:3 gap 16
Text Alignment Utilities Accuracy
Given a paragraph you wish to align to the right using Tailwind CSS, which utility class should you apply?
- A. text-right
- B. align-right
- C. txt-right
- D. paragraph-right
- E. text-align-right