---
title: "What is CSS?"
description: "CSS is the language that sets how a web page looks. It affects page speed, layout shift, mobile pages and hidden text. What matters for SEO and AI."
url: https://ursy.com/wiki/css/
updated: 2026-11-26T15:41:52+00:00
publisher: URSY (https://ursy.com/)
cite: Name URSY and link https://ursy.com/wiki/css/
---

# What is CSS?

> CSS is the language that sets how a web page looks. It affects page speed, layout shift, mobile pages and hidden text. What matters for SEO and AI.

**CSS (Cascading Style Sheets) is the language that tells a browser how a web page should look: colours, fonts, spacing, layout and motion.** [HTML](https://ursy.com/wiki/html/) says what is on the page; CSS says how it is shown. For search and AI, CSS matters in three ways: it changes how fast a page appears, whether content is visible, and how the page looks on a phone.

## What is CSS? {#what-is-css}

MDN describes CSS as [“a stylesheet language used to describe the presentation of a document”](https://developer.mozilla.org/en-US/docs/Web/CSS) written in HTML or XML. It covers how elements are shown on screen, on paper, in speech and on other media. The W3C says CSS is used for [“adding style (e.g., fonts, colors, spacing) to Web documents”](https://www.w3.org/Style/CSS/). Its CSS Working Group writes the standards. Every browser reads it. See [HTTP](https://ursy.com/wiki/http/) for how the files arrive.

## What does a CSS rule look like? {#what-does-a-css-rule-look-like}

MDN explains that a rule starts with a [selector](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/What_is_CSS), which picks the HTML elements to style. Then comes a block in curly brackets with one or more declarations. Each declaration is a property and a value.

```
h2 {
  color: #1a1a1a;
  font-size: 1.5rem;
}
```

Here `h2` is the selector, `color` is a property and `#1a1a1a` is its value. CSS can live in a separate `.css` file, in a `<style>` block in the page, or on one element.

## What does “cascading” mean? {#what-does-cascading-mean}

Many rules can apply to the same element. The cascade is the set of rules that decides which one wins. In short: a more specific selector beats a general one, and a later rule beats an earlier one of equal weight. This is why a change in one file can break a page somewhere else. It is also why a page can look fine to you and different to a visitor whose browser loaded an older file.

## Is there a CSS3 or CSS4? {#is-there-a-css3-or-css4}

No. MDN says [“There will never be a CSS3 or a CSS4”](https://developer.mozilla.org/en-US/docs/Web/CSS). CSS is now one language made of modules, and each module has its own level, such as CSS Color Module Level 5. The W3C publishes a yearly snapshot that lists the parts [“ready for implementers”](https://www.w3.org/Style/CSS/).

## Why does CSS matter for search? {#why-does-css-matter-for-search}

[Google](https://ursy.com/wiki/google/) renders pages to see them as people do. Its JavaScript guide says Google Search uses [“an evergreen version of Chromium”](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics) to do it. Its robots.txt guide warns that if blocking a resource makes the page [“harder for Google’s crawler to understand”](https://developers.google.com/search/docs/crawling-indexing/robots/intro), you should not block it. Blocked CSS can make a good mobile page look broken to Google. See [robots.txt](https://ursy.com/wiki/robots-txt/) and [mobile SEO](https://ursy.com/wiki/mobile-seo/).

## Does CSS change titles in Google? {#does-css-change-titles-in-google}

It can. Google builds [title links](https://ursy.com/wiki/title-tag/) mainly from the `<title>` element. But its list of sources also includes [“other content that’s large and prominent through the use of style treatments”](https://developers.google.com/search/docs/appearance/title-link). So text that CSS makes big and bold near the top can end up in your title link. Keep your main heading and your title saying the same thing.

## How does CSS affect page speed? {#how-does-css-affect-page-speed}

web.dev says [“CSS files are render-blocking resources”](https://web.dev/articles/defer-non-critical-css): the browser must load and process them before it shows the page. Large style sheets slow the first paint. A style sheet that applies only when the page is printed [does not need to block](https://web.dev/articles/critical-rendering-path/render-blocking-css) the first view, so print rules belong in their own file, marked for print. The fix web.dev shows is to inline the small amount of CSS needed for the top of the page and load the rest later. In its demo, 55.9% of the CSS file was unused. See [page speed](https://ursy.com/wiki/page-speed/), [Largest Contentful Paint](https://ursy.com/wiki/largest-contentful-paint/) and [why your website is slow](https://ursy.com/wiki/why-your-website-is-slow/).

## How does CSS affect layout shift? {#how-does-css-affect-layout-shift}

[Cumulative Layout Shift](https://ursy.com/wiki/cumulative-layout-shift/) measures how much the page jumps while it loads. web.dev says a good score is [0.1 or less](https://web.dev/articles/cls) at the 75th percentile of page loads. Causes include images with no set size and fonts that render bigger or smaller than the fallback. For movement, web.dev advises `transform: translate()` rather than changing `top` or `left`. See [Core Web Vitals](https://ursy.com/wiki/core-web-vitals/).

## Why does CSS matter for AI answers? {#why-does-css-matter-for-ai-answers}

Text styled by CSS is still text in the HTML. That is good: a [search crawler](https://ursy.com/wiki/search-crawler/) or AI crawler that reads raw HTML, and one that renders the page, both get the words. The exception is text that CSS adds itself with `::before`. It is not part of the HTML document, so a crawler reading raw HTML never sees it, and MDN says adding content this way is [“not reliably accessible to screen readers”](https://developer.mozilla.org/en-US/docs/Web/CSS/::before). The risk is in the other direction. Google says it [“doesn’t index CSS images”](https://developers.google.com/search/docs/appearance/google-images), so a picture set as a CSS background is invisible to image search. Words drawn inside a background image cannot be quoted at all. Put facts in text and pictures in `<img>` with [alt text](https://ursy.com/wiki/alt-text/). See [AI crawler](https://ursy.com/wiki/ai-crawler/) and [image SEO](https://ursy.com/wiki/image-seo/).

## When is hidden text a problem? {#when-is-hidden-text-a-problem}

When the aim is to fool [search engines](https://ursy.com/wiki/search-engine/). Google’s spam policies list [“Using CSS to position text off-screen”](https://developers.google.com/search/docs/essentials/spam-policies) and setting the font size or opacity to 0 as hidden text abuse. They also say accordions, tabs, sliders, tooltips and text only for screen readers are fine. On phones, Google’s mobile-first guide allows [accordions or tabs](https://developers.google.com/search/docs/crawling-indexing/mobile/mobile-sites-mobile-first-indexing), if the content matches desktop. See [cloaking](https://ursy.com/wiki/cloaking/) and [black hat SEO](https://ursy.com/wiki/black-hat-seo/).

## How does CSS make a page work on phones? {#how-does-css-make-a-page-work-on-phones}

With media queries. MDN says they test things like screen width and [“apply CSS selectively”](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/CSS_layout/Responsive_Design). Responsive design also needs the [viewport meta tag](https://ursy.com/wiki/viewport-meta-tag/). Google [recommends Responsive Web Design](https://developers.google.com/search/docs/crawling-indexing/mobile/mobile-sites-mobile-first-indexing): the same HTML at the same address for every device, with CSS changing the layout. Google indexes the mobile version first. See [mobile-first indexing](https://ursy.com/wiki/mobile-first-indexing/).

## Does CSS affect accessibility? {#does-css-affect-accessibility}

Yes. Colour is set in CSS, and so is contrast. WCAG 2.2 asks for a contrast ratio of [at least 4.5:1](https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html) for normal text and 3:1 for large text (level AA). Light grey text on white fails. CSS can also hide focus outlines, which keyboard users need. See [web accessibility](https://ursy.com/wiki/web-accessibility/) and [visual trust](https://ursy.com/wiki/visual-trust/).

## What are the common mistakes? {#what-are-the-common-mistakes}

- **Blocking CSS in robots.txt.**  Google may then see a broken page.
- **One huge style sheet for every page.**  Each page loads rules it never uses.
- **Facts in background images.**  Not indexed, not quotable.
- **Hiding text to rank.**  Off-screen or zero-size text breaks Google’s spam policies.
- **Images with no size.**  The page jumps as they load.
- **Long cache times with no new file name.**  Visitors and crawlers keep an old file after you change it. See [edge cache](https://ursy.com/wiki/edge-cache/) and [cache purge](https://ursy.com/wiki/cache-purge/).
- **Low contrast.**  Hard to read for many people.
- **Different content on phones.**  Hiding a heading or price on mobile and showing another means Google indexes the mobile one. Keep the facts the same on every screen.

## A worked example {#a-worked-example}

| What we found | Why it matters | Fix |
| --- | --- | --- |
| robots.txt blocks `/assets/css/` | Google cannot render the layout | Allow the folder |
| 300 KB style sheet in the head | Slows the first paint | Inline the top-of-page CSS, load the rest later |
| Price written inside a banner image | No crawler can read it | Put the price in text |
| Grey text at 2.8:1 contrast | Fails WCAG AA | Darken to 4.5:1 or more |
| Hero image with no width or height | Layout shift | Set the size or an aspect ratio |

## How to check it {#how-to-check-it}

1. **Check that crawlers may fetch your CSS.**  The [Robots.txt Checker](https://ursy.com/robots-txt-checker/) tests any path, such as your CSS folder. The [AI Bot Checker](https://ursy.com/ai-bot-checker/) shows which AI crawlers are allowed in.
2. **Check how the CSS file is served.**  The [HTTP Header Checker](https://ursy.com/http-header-checker/) shows the status code, content type and cache headers of the `.css` address. See [HTTP status code](https://ursy.com/wiki/http-status-code/).
3. **Check [redirects](https://ursy.com/wiki/redirect/).**  A style sheet behind a [redirect chain](https://ursy.com/wiki/redirect-chain/) loads slower. The [Redirect Checker](https://ursy.com/redirect-checker/) shows every hop.
4. **Check the tags in the head.**  The [Meta Tag Checker](https://ursy.com/meta-tag-checker/) shows the viewport tag and other [meta tags](https://ursy.com/wiki/meta-tag/).
5. **Check links to files.**  The [Broken Link Checker](https://ursy.com/broken-link-checker/) finds [broken links](https://ursy.com/wiki/broken-link/) on a page.
6. **Check what AI can read.**  The [AI Readiness Checker](https://ursy.com/ai-readiness-checker/) scores whether the page’s content is ready to be read and quoted. The [Schema Markup Checker](https://ursy.com/schema-checker/) confirms facts are also in [structured data](https://ursy.com/wiki/schema-markup/).
7. **See the page as Google renders it.**  [URL Inspection](https://ursy.com/wiki/url-inspection/) in [Google Search Console](https://ursy.com/wiki/google-search-console/) lets you test the live page and see whether your content appears on the page Google renders, as Google’s mobile-first guide advises.
8. **Compare with a rival.**  [Compare Two Websites](https://ursy.com/compare-websites/) puts both pages side by side.
9. **Tidy and test the CSS itself.**  The [CSS Beautifier](https://ursy.com/webmaster-tools/css-beautifier/) makes a file readable. The [Colour Contrast Checker](https://ursy.com/webmaster-tools/colour-contrast-checker/) tests text colours. The [Colour Blindness Simulator](https://ursy.com/webmaster-tools/colour-blindness-simulator/) shows how others see them.
10. **Check what non-rendering [bots](https://ursy.com/wiki/bot-web-robot/) miss.**  The [JavaScript SEO Checker](https://ursy.com/javascript-seo-checker/) shows what bots that do not run JavaScript cannot see. The [Page Speed Checker](https://ursy.com/page-speed-checker/) and [Core Web Vitals Checker](https://ursy.com/core-web-vitals-checker/) are coming soon.
11. **Across the whole site:**  the [Asset diet report](https://ursy.com/pro/asset-diet-report/) lists scripts and styles each page type loads but never uses, and [Real-user speed](https://ursy.com/pro/real-user-speed/) shows Core Web Vitals from your own visitors (in URSY Pro, opening in stages).

## What URSY.com counts {#what-ursy-counts}

A request, in our counting, is one answer the website gave: a page, file, image, feed or API reply. So a bot that fetches your style sheets shows up as requests for those files, next to the pages it read. We count from the edge log as well as the origin, so files the cache answers are counted too. The rules are on our [methodology](https://ursy.com/methodology/) page.

## Questions {#questions}

### Is CSS a programming language? {#is-css-a-programming-language}

It is a style sheet language. It describes how things look; it does not run logic like JavaScript. See [JavaScript SEO](https://ursy.com/wiki/javascript-seo/).

### Does Google read CSS? {#does-google-read-css}

Google renders pages with Chromium, so it loads CSS it is allowed to fetch. It uses it to see the page as people do.

### Is hiding text in tabs bad for SEO? {#is-hiding-text-in-tabs-bad-for-seo}

No. Google’s spam policies say tabbed and accordion content is not abuse. Hiding text only to rank is.

### Should I inline all my CSS? {#should-i-inline-all-my-css}

No. Inline only the small part needed for the top of the page. Load the rest as a file, which the browser can cache.

## Related words {#related-words}

- [Technical SEO](https://ursy.com/wiki/technical-seo/)
- [Core Web Vitals](https://ursy.com/wiki/core-web-vitals/)
- [Cumulative Layout Shift](https://ursy.com/wiki/cumulative-layout-shift/)
- [Page speed](https://ursy.com/wiki/page-speed/)
- [Mobile SEO](https://ursy.com/wiki/mobile-seo/)
- [JavaScript SEO](https://ursy.com/wiki/javascript-seo/)
- [Web accessibility](https://ursy.com/wiki/web-accessibility/)
- [Cloaking](https://ursy.com/wiki/cloaking/)
- [Lazy loading](https://ursy.com/wiki/lazy-loading/)

## Sources {#sources}

- [MDN: CSS](https://developer.mozilla.org/en-US/docs/Web/CSS), checked 24 November 2026
- [MDN: What is CSS?](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/What_is_CSS), checked 24 November 2026
- [MDN: Responsive design](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/CSS_layout/Responsive_Design), checked 24 November 2026
- [W3C: Cascading Style Sheets home page](https://www.w3.org/Style/CSS/), checked 24 November 2026
- [W3C WAI: Understanding Success Criterion 1.4.3 Contrast (Minimum)](https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html), checked 24 November 2026
- [Google Search Central: Understand JavaScript SEO basics](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics), checked 24 November 2026
- [Google Search Central: Introduction to robots.txt](https://developers.google.com/search/docs/crawling-indexing/robots/intro), checked 24 November 2026
- [Google Search Central: Influencing your title links](https://developers.google.com/search/docs/appearance/title-link), checked 24 November 2026
- [Google Search Central: Image SEO guide](https://developers.google.com/search/docs/appearance/google-images), checked 24 November 2026
- [Google Search Central: Spam policies for Google web search](https://developers.google.com/search/docs/essentials/spam-policies), checked 24 November 2026
- [Google Search Central: Mobile-first indexing guide](https://developers.google.com/search/docs/crawling-indexing/mobile/mobile-sites-mobile-first-indexing), checked 24 November 2026
- [web.dev: Defer non-critical CSS](https://web.dev/articles/defer-non-critical-css), checked 24 November 2026
- [web.dev: Render blocking CSS](https://web.dev/articles/critical-rendering-path/render-blocking-css), checked 24 November 2026
- [MDN: ::before](https://developer.mozilla.org/en-US/docs/Web/CSS/::before), checked 24 November 2026
- [web.dev: Cumulative Layout Shift (CLS)](https://web.dev/articles/cls), checked 24 November 2026

*Updated 24 November 2026 by URSY.com.*
