Back to Home

What is CSS?

Cascading Style Sheets (CSS) is the language that styles the web.

History of CSS

1994

HÃ¥kon Wium Lie proposes CSS while working at CERN with Tim Berners-Lee

1996

CSS Level 1 becomes an official W3C Recommendation

1998

CSS Level 2 is released with positioning and z-index

2011

CSS Level 3 modules begin rolling out with new features

Key Features of CSS

CSS Code Example


/* Basic CSS Syntax Example */
.button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px;
}
                

CSS Selectors

Selector Example Description
Element p { } Selects all <p> elements
Class .class-name { } Selects elements with class="class-name"
ID #id-name { } Selects element with id="id-name"