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