HTML & CSS References

What is CSS?

Learn how the CSS programming language is used to define styles on a web page.

Introduction to CSS

CSS is the language that is used to define styles on a web page, including colors, fonts, layout, and other design elements. Standing for Cascading Style Sheets, CSS explains how HTML elements should be displayed and arranged on a computer screen, mobile device, or in other media.

CSS and HTML are actually independent from one another — CSS can, in fact, be used with any XML-based markup language.

Still, HTML and CSS are often associated because of how seamlessly they pair together. For instance, using the class attribute on any HTML element allows you to easily target that element from CSS (or JavaScript).

Although most Web Developers would need a variety of programming languages to do their job, learning HTML and CSS would be enough for a beginner to build their first web page.


What is CSS Used For?

CSS is used to describe to a browser how HTML elements should appear to a user. Each browser has its own default CSS, but as soon as we know how to write CSS ourselves, we can change how we present our HTML elements to a user.

Depending on how the user is interacting with a web page, these web pages can appear differently. Some of the ways are on-screen (within a browser), in print (when a web page is printed on paper), or by voice (when a web page is accessed using a screen-reader). Using CSS for web browsers means making a website more stylistic and beautiful.

CSS is integral to the web development process. Without CSS, simple websites could look like a plain text document. CSS is not only used for styling but also for adding animations, visual cues and designs that are accessible by everyone.

Ultimately, CSS just styles already existing HTML elements. So it is very important for a CSS file to know which HTML element it is styling and for a HTML file to know where all the styles reside.

Learn HTML & CSS Today

Get hands-on experience writing real code while you learn with interactive tutorials in our free online learning platform – no downloads or complicated setup required.

  • Free and fun
  • Designed for beginners
  • No download or setup required