0
0
Bootsrapmarkup~10 mins

Text alignment utilities in Bootsrap - Interactive Code Practice

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

Complete the code to align the text to the center using Bootstrap classes.

Bootsrap
<p class="text-[1]">This text is centered.</p>
Drag options to blanks, or click blank then click option'
Aleft
Bright
Ccenter
Djustify
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'text-left' or 'text-right' instead of 'text-center'.
Forgetting to add the class attribute.
2fill in blank
medium

Complete the code to align the text to the right on large screens only.

Bootsrap
<p class="text-lg-[1]">This text is right aligned on large screens.</p>
Drag options to blanks, or click blank then click option'
Aleft
Bright
Ccenter
Djustify
Attempts:
3 left
💡 Hint
Common Mistakes
Using text-right without the breakpoint prefix.
Using text-lg-center instead of right.
3fill in blank
hard

Fix the error in the code to justify the text using Bootstrap classes.

Bootsrap
<div class="text-[1]">This text should be justified.</div>
Drag options to blanks, or click blank then click option'
Ajustify
Bcenter
Cright
Dleft
Attempts:
3 left
💡 Hint
Common Mistakes
Using text-center or text-right instead of text-justify.
Misspelling the class name.
4fill in blank
hard

Fill both blanks to align text left on small screens and center on medium screens.

Bootsrap
<p class="text-[1] text-md-[2]">Responsive text alignment.</p>
Drag options to blanks, or click blank then click option'
Aleft
Bcenter
Cright
Djustify
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same alignment for both blanks.
Mixing up breakpoint prefixes.
5fill in blank
hard

Fill all three blanks to align text right on extra small screens, justify on small screens, and left on large screens.

Bootsrap
<div class="text-[1] text-sm-[2] text-lg-[3]">Multi-breakpoint text alignment.</div>
Drag options to blanks, or click blank then click option'
Aright
Bjustify
Cleft
Dcenter
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong breakpoint prefix for the alignment.
Confusing justify with center or left.