How CSS works
While HTML says what is on a page, CSS says how it should look. It contains rules such as: all headings will be dark blue, buttons rounded and orange, body text a certain size and line height. One rule applies to the whole website, so changing a button colour in one place changes it everywhere.
CSS also handles page layout. It decides whether products appear in four columns on a computer and in one on a phone. It is what makes responsive design work.
Why it matters
CSS shapes the first impression. The same content can look cheap or professional purely because of how it is styled. It also affects readability: small type, weak contrast or cramped paragraphs put off even someone who wanted to buy.
It affects speed too. Themes and page builders often load large stylesheets of which the site uses only a fraction. The browser still has to download all of it before it shows the page.
A real example
A café in Banská Bystrica wanted to change its website colours to match a new logo. The previous developer had written the colours in hundreds of places, so a simple change would have taken days. After the styles were tidied up, the main colours are defined in one place and the next change takes minutes.
Tips and common mistakes
- Don't change the design directly in the theme files. An update will overwrite your changes. They belong in a child theme or custom CSS.
- Check text contrast on a phone in sunlight, not just on a good monitor.
- Remove unused styles and shrink the rest with minification.
- Keep a consistent system – a few colours, two typefaces, the same spacing.
When speeding up websites, I often start by cleaning up the CSS, because it tends to be a cheap and quick win.