└> Intro: What is CSS?
In the early days of the internet, a webpage was pretty much composed of only html elements. If you wanted to change the font on some text, you would have to add a whole new font tag to your page, if you wanted to lay things out you would have to use tables, which is a very constricting, and time consuming way of setting up a page. On top of all that, the basic html tags dont make for a very unique looking website, href links always looked like links, with an underline, for example.
These days many things have changed, websites are easier to layout and visions are much easier to accomplish due to one simple thing, called CSS, which is short for Cascading Style Sheets. One of the main goals of CSS was to seperate the content with the way its presented, no longer would you have to embed the barrage of html tags into your site just to change the way its presented. The way this is accomplished is with the use of the CSS markup language, this language is entirely seperate from html, but when combined, can alter the look and feel of almost any html element. CSS has actually been around for quite a long time, but has only just recently started to become widely adopted. You can read more about the early history of CSS here and here.
So how does it work?
CSS in its simplest form is just a set of rules that the browser uses when it displays the html page that references those rules. Rules are defined using a declaration block, and a selector, which just means that you select which html element you want to affect, and define the rules for it in the declaration block. A quick example, if you know any html, you are familiar with the <body> tag, which pretty much all websites require. If you wanted to define how this body tag appears using css instead of html, you would simple define "body" as the selector, and then place the rules in the declaration block (curly braces), like so:
body {
property: value;
}
As you can see, its quite simple! Nearly every html tag can be influenced in the same way using CSS by simple defining that particular tag as the selector.
Continue on to Lesson 1 if yout interested in learning!