tailwind.config.js?extend inside theme to add custom fonts without overwriting defaults.Option D correctly extends the fontFamily inside the theme object. This way, Tailwind keeps its default fonts and adds your custom font.
Options A, C, and D either miss the extend or place the fontFamily in the wrong place, which can overwrite defaults or cause errors.
<p> use?tailwind.config.js includes:fontFamily: { lobster: ['Lobster', 'cursive'] }HTML:
<p class="font-lobster">Hello World</p><p class="font-lobster">Hello World</p>Since the config defines lobster font family, Tailwind generates the class font-lobster. This applies the 'Lobster' font if available, else the cursive fallback.
Options B and C ignore the custom font. Option A is incorrect because the class is valid.
font-lobster only to all <h1> and <h2> inside the <main> element. Which CSS selector is correct?Option B selects all h1 and h2 inside main that have the font-lobster class.
Option B only selects direct children, which misses nested headings.
Option B tries to apply the font to all headings inside main regardless of class, which is different.
Option B selects headings anywhere with the class, ignoring the main container.
font-lobster horizontally on small screens and align left on medium and larger screens using Tailwind CSS. Which class combination achieves this?<p class="font-lobster ???">Welcome!</p>Option A sets text center by default (small screens) and switches to left on medium and up.
Option A reverses the order, so small screens are left aligned.
Option A has conflicting classes that override each other incorrectly.
Option A applies center only on medium screens but leaves small screens left aligned.
font-lobster. What is the best practice to keep your site accessible?Option C is best because decorative fonts can be hard to read, so limiting their use and providing fallbacks helps all users.
Option C can reduce readability for body text.
Option C makes text hard to read.
Option C harms accessibility by hiding content from screen readers.