The text-xl class sets the font size to 1.25rem (20px) by default. text-lg is 1.125rem (18px).
md: to apply styles at medium screen sizes and above.Option A uses the correct breakpoint prefix md: to change font size from text-base (1rem) to text-xl (1.25rem) at medium screens.
Other options either use invalid class names or incorrect breakpoint usage.
text-2xl in Tailwind CSS?text-2xl corresponds to 1.5rem by default.Since 1rem equals 16px, 1.5rem equals 24px. Tailwind's text-2xl sets font size to 1.5rem, so the computed size is 24px.
Option D uses the correct syntax for arbitrary values: text-[22px].
Other options are invalid Tailwind class names.
Using relative units like rem allows font sizes to scale with user preferences and browser settings, improving accessibility.
Fixed pixel sizes or disabling zoom harm accessibility.
