Tailwind CSS

Tailwind CSS

Test your Tailwind CSS knowledge with free quizzes on MyCodeSkills covering core concepts.


  1. What is Tailwind CSS?

    • A CSS framework
    • A JavaScript library
    • A CMS
    • A font library
  2. Tailwind is known as a:

    • Component-based framework
    • Utility-first framework
    • Object-oriented framework
    • Layout engine
  3. How do you include Tailwind via CDN?

    • <script> tag
    • <style> tag
    • <link> to CSS from CDN
    • <meta> tag
  4. Which command installs Tailwind via npm?

    • npm install bootstrap
    • npm install tailwindcss
    • npm tailwind
    • install tailwind
  5. Which class gives margin in Tailwind?

    • .padding-4
    • .margin-4
    • .m-4
    • .mg-4
  6. What is the purpose of the tailwind.config.js file?

    • To define React components
    • To compile CSS
    • To customize Tailwind settings
    • To deploy Tailwind project
  7. What does the @apply directive do in Tailwind CSS?

    • It removes unused classes
    • It allows combining utilities into a class
    • It enables dark mode
    • It applies JavaScript logic
  8. Which class sets the padding on large screens only?

    • p-lg-4
    • padding-lg-4
    • lg:p-4
    • p:lg-4
  9. How do you make text red on hover?

    • hover-text-red-500
    • hover:text:red-500
    • hover:red-text-500
    • hover:text-red-500
  10. Which is a valid dark mode configuration option?

    • darkMode: false
    • dark: true
    • mode: dark
    • darkMode: 'class'
  11. What is the purpose of tailwind.config.js in a Tailwind project?

    • To define global CSS classes
    • To configure custom themes and variants
    • To write JavaScript logic
    • To define routing
  12. How do you enable dark mode in Tailwind CSS?

    • Use dark: prefix on classes
    • Use @dark in CSS
    • Use --dark variable
    • Use mode: "light" in config
  13. Which key allows defining custom screen breakpoints in tailwind.config.js?

    • variants
    • screens
    • mediaQueries
    • breakpoints
  14. What does the purge key in Tailwind config help with?

    • Caching images
    • Reducing unused CSS in production
    • Storing theme variables
    • Managing plugins
  15. How do you extend Tailwind with custom colors?

    • Edit @tailwind base
    • Use @import in CSS
    • Modify the theme.extend.colors key
    • Add CSS files to public folder