Your place on the Internet

The Fundamentals of CSS

by Roger

When it comes to client-side programming, understanding HTML and Cascading Style Sheets (CSS) are fundamental steps in learning. Where HTML is used to provide structure, CSS is used to influence the appearance of web pages. Though the two languages are often seen and used in conjunction, they are separate entities. CSS is a language that allows the developer to alter solely the aesthetic presentation of a page; developed by web developers in 1997 to forcibly separate structure and style. With style out of the equation, HTML is more utility-based, focusing entirely on the structure of a page. Stylistic changes, therefore, are conducted solely in CSS, which makes visual tinkering more manageable.

The Breakdown

Understanding the name is easier if we start with the last part first:

  • Style Sheets – technical specifications in the form of a text file (similarly to an HTML file) which dictate how a web browser will present the page; changeable qualities are affected, like font size and family, colour, and layout. Change the way a single HTML file is presented on different-sized screens (i.e. PCs, tablets, smartphones), and the appearance if a web page is printed.
  • Cascading – refers to the series of style sheets that a web page is affected by. Every web page has access to at least one style sheet though it can filter through several, ultimately displaying the one with most precedence. All web browser applications have a default style sheet – called the user agent style sheet – that applies to pages accessed through the browser. If a site author has not included a style sheet, the user agent style sheet is used; however, if the author has included a style sheet, then that one will take precedence.

Web development is wholly concerned with building websites, generating code, and ensuring the performance of functional features. CSS is an invaluable tool for developers and designers to grab hold of, capable as it is of altering the visual style of page.