Cascading Style Sheets (CSS)

Cascading Style Sheets, commonly abbreviated as CSS, is a style language used to define the visual presentation of web pages. It is one of the core web technologies alongside HTML and JavaScript. HTML creates the structure and content of a page, while CSS determines how that content should appear. JavaScript is used to add interaction, dynamic behaviour and functionality to the page.

CSS can control colours, fonts, headings, spacing, alignment, borders, backgrounds, animations and overall layout. It can also define how a page should appear on desktop, tablet and mobile devices. For this reason, CSS is important not only for visual design but also for user experience, readability, accessibility and responsive design. Well-written CSS helps make a website more organised, understandable and usable.

There are three common ways to use CSS: inline, internal and external CSS. Inline CSS is written directly inside a specific HTML element and affects only that element. It may be used to change the colour of a single link or the size of a single heading. However, it can become difficult to manage in larger projects, so it is usually preferred only in limited cases.

Internal CSS is written inside the HTML document, usually within a <style> tag in the <head> section. This method is often used when a style rule applies only to a single page. External CSS stores style rules in a separate .css file. For websites where the same design rules are used across multiple pages, external CSS provides a more organised, sustainable and scalable structure.

The basic logic of CSS is built around selectors and properties. For example, color can be used to change the colour of a link, border can add a border and font-family can define the typeface. The a tag represents links in HTML, while CSS controls how those links appear visually. For this reason, HTML tags and CSS properties should be understood as separate elements with different functions.

The “cascading” structure of CSS determines which style rule applies when multiple rules target the same element. Specificity, source order and inheritance all play a role in this process. For example, if an element has both a general class rule and a more specific selector rule, the stronger rule may take effect. This structure makes CSS flexible, but it can also create complexity in large projects if it is not organised carefully.

In modern web design, CSS, HTML and JavaScript are used together to create fast, accessible and user-friendly interfaces. CSS can build page layouts, support mobile compatibility and make buttons, forms and menus easier to use. Animations and transition effects can enhance user interaction, but they should not harm performance or accessibility. Properly structured CSS is one of the core technologies that improves both the visual quality and usability of websites.

Discover it in the dictionary

Track the digital heartbeat with Kriko

Subscribe to receive curated insights, news, and ideas shaping the digital landscape.