Screen Breakpoints and Responsive CSS
Step 1 of 5
Media queries let you apply different CSS styles based on the screen size! They're like "if statements" for CSS.
"IF the screen is small, use small text."
"IF the screen is big, use big text."
/* Default styles for mobile */body { font-size: 16px;} /* Tablet styles */@media (min-width: 768px) { body { font-size: 18px; }} /* Desktop styles */@media (min-width: 1024px) { body { font-size: 20px; }}Font size: 16px - Small screens get this
Font size: 18px - Tablets get this
Font size: 20px - Desktops get this