0
0
Tailwindmarkup~10 mins

Tailwind with Vue single-file components - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to add a Tailwind class that makes the text bold.

Tailwind
<template>
  <div class="[1]">Hello, Vue with Tailwind!</div>
</template>
Drag options to blanks, or click blank then click option'
Afont-bold
Btext-center
Cbg-blue-500
Dp-4
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing padding or background color classes instead of font weight.
Using text alignment classes which don't affect boldness.
2fill in blank
medium

Complete the code to apply a responsive padding of 4 on small screens and 8 on medium screens.

Tailwind
<template>
  <div class="p-4 [1]">Responsive padding</div>
</template>
Drag options to blanks, or click blank then click option'
Alg:p-4
Bsm:p-8
Cmd:p-6
Dmd:p-8
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong screen size prefix like sm: or lg:.
Choosing padding values that don't match the requirement.
3fill in blank
hard

Fix the error in the Tailwind class that should center text horizontally.

Tailwind
<template>
  <p class="[1]">Centered text</p>
</template>
Drag options to blanks, or click blank then click option'
Atext-center
Bcenter-text
Ctext-align-center
Dalign-center
Attempts:
3 left
💡 Hint
Common Mistakes
Using CSS property names as class names.
Mixing up class names from other CSS frameworks.
4fill in blank
hard

Fill both blanks to create a flex container that centers items vertically and horizontally.

Tailwind
<template>
  <div class="flex [1] [2]">
    Centered content
  </div>
</template>
Drag options to blanks, or click blank then click option'
Aitems-center
Bjustify-start
Cjustify-center
Ditems-start
Attempts:
3 left
💡 Hint
Common Mistakes
Using items-start or justify-start which align to the start, not center.
Confusing vertical and horizontal alignment classes.
5fill in blank
hard

Fill all three blanks to create a Vue component with a button styled with Tailwind that changes color on hover.

Tailwind
<template>
  <button class="bg-blue-500 [1] text-white [2] rounded [3]">
    Click me
  </button>
</template>
Drag options to blanks, or click blank then click option'
Ahover:bg-blue-700
Bpx-4
Cpy-2
Dhover:text-black
Attempts:
3 left
💡 Hint
Common Mistakes
Using hover classes that change text color instead of background.
Mixing up padding directions or missing padding classes.