Bootstrap MCQs – Typography & Utilities

21.) What does the .text-reset class do?

A) Resets text color to the parent’s default color
B) Removes text styles
C) Changes text to default black
D) Makes text smaller

Answer: Option A

Explanation: .text-reset helps maintain consistent text colors inside elements like links.

22.) How do you apply a background color to text in Bootstrap?

A) .bg-text
B) .text-bg
C) .bg-* classes
D) .text-background

Answer: Option C

Explanation: .bg-* classes apply background colors to text and other elements.

23.) What happens when you use .text-nowrap in Bootstrap?

A) Forces text to wrap
B) Prevents text from wrapping
C) Changes text to uppercase
D) Increases font weight

Answer: Option B

Explanation: .text-nowrap keeps text on a single line, even if it overflows.

24.) Which class transforms text into lowercase letters?

A) .text-lowercase
B) .text-smallcase
C) .text-downcase
D) .text-lower

Answer: Option A

Explanation: .text-lowercase converts all text to lowercase letters.

25.) Which Bootstrap class allows controlling letter spacing?

A) .letter-spacing
B) .text-spacing
C) .spacing-text
D) Bootstrap does not have a built-in letter-spacing class

Answer: Option D

Explanation: Bootstrap does not provide a default class for letter spacing.

26.) What does .text-black-50 do in Bootstrap?

A) Sets text color to 50% black opacity
B) Makes text fully black
C) Applies a black background
D) Converts text to bold black

Answer: Option A

Explanation: .text-black-50 reduces text opacity to 50% of pure black.

27.) Which class hides text visually while keeping it accessible?

A) .text-hide
B) .text-invisible
C) .visually-hidden
D) .text-none

Answer: Option C

Explanation: .visually-hidden hides text for sighted users but keeps it accessible to screen readers.

28.) How do you remove padding and margin from an element in Bootstrap?

A) .padding-0 margin-0
B) .m-0 p-0
C) .p-none m-none
D) .spacing-none

Answer: Option B

Explanation: .m-0 removes margin, and .p-0 removes padding in Bootstrap.

29.) Which class makes an element display inline?

A) .d-block
B) .display-inline
C) .d-inline-block
D) .d-inline

Answer: Option D

Explanation: .d-inline makes an element inline, meaning it won’t break to a new line.

30.) What does the .opacity-50 class do?

A) Increases text contrast
B) Makes the element 50% transparent
C) Changes text color
D) Adds a border

Answer: Option B

Explanation: .opacity-50 applies 50% transparency to an element.

Leave a Reply

Your email address will not be published. Required fields are marked *