Complete the code to set the font size to large using Tailwind CSS.
<p class="text-[1]">This is large text.</p>
text-sm which is smaller size.text-base which is default size.The class text-lg sets the font size to large in Tailwind CSS.
Complete the code to make the text size responsive, larger on medium screens.
<p class="text-base [1]:text-xl">Responsive text size</p>
lg: which applies on large screens, not medium.sm: which applies on small screens.The prefix md: applies styles on medium screens and up. So md:text-xl makes text larger on medium screens.
Fix the error in the code to correctly set font size to extra large.
<h1 class="text[1]">Big heading</h1>
textxl without dash.:xl which is invalid here.Tailwind font size classes use a dash after text, so text-xl is correct. The blank is after text, so -xl completes it.
Fill both blanks to create a paragraph with small text on mobile and medium text on medium screens.
<p class="text-[1] [2]:text-base">Adaptive text size</p>
text-base as default instead of small.md: prefix.The class text-sm sets small text by default. The prefix md: applies styles on medium screens, so md:text-base sets medium text size on medium screens.
Fill all three blanks to create a heading with base font size, bold weight, and extra large size on large screens.
<h2 class="[1] [2] [3]:text-xl">Styled heading</h2>
text-lg as default instead of base.font-bold class.text-base sets the base font size, font-bold makes the text bold, and lg:text-xl applies extra large text on large screens.