completefrontend
BLOGS BY TAG

CSS basics

Every blog about CSS basics on CompleteFrontend, newest first.

Title card for Tailwind CSS vs CSS, comparing a .save-button rule with padding 0.5rem 1rem to the Tailwind classes px-4 py-2, next to the blue Save button both produce

HTML and CSS

Should you use Tailwind CSS or plain CSS?

Tailwind CSS styles elements with small utility classes in your HTML, while plain CSS uses your own rules in a stylesheet. Here's the same button written both…

5 min read

Title card for px vs em vs rem in CSS, with three blocks: px is a fixed size, em follows the local font size, and rem follows the root font size

HTML and CSS

px vs em vs rem in CSS

px is fixed, em follows the font size of the element or its parent, and rem follows the root font size. Here's how each one works out in pixels, why em…

4 min read

Title card for what is CSS specificity, with selectors ranked from weakest to strongest: p at 0-0-1, .note at 0-1-0, #intro at 1-0-0, an inline style, then !important

HTML and CSS

What is CSS specificity?

When your CSS doesn't apply, another rule is usually winning. Here's how the browser scores selectors, why one ID beats any number of classes, where inline…

5 min read