CSS

Share

What is CSS?

CSS (an abbreviation for Cascading StyleSheets) is a programming language used mainly for declaring styles in webpages. With CSS, it's possible to define the color and size of text, the background color, the style of borders, and even the position of elements on a webpage, among dozens of other things.

Example of CSS Code

/* This gives elements that match this selector
   a padding and a border. */
.panel {
    padding: 5px;
    border: 1px solid #000;
}

.title {
    font-size: 200%;
}

/* This selector overrides the font-size property
   for titles that are descendants of panels. */
.panel .title {
    font-size: 150%;
}

/* This makes elements marked with both
   "panel" and "warning" classes to
   have a yellow background. */
.panel.warning {
    background: #ff0;
}
Written by Noel Santos.

About the Author

I'm a self-taught Brazilian programmer graduated in IT from a FATEC. In a world of increasingly complex and essential computers, I decided to use my technical expertise in hardware, desktop applications, and web technologies to create an informative resource to make PC's easier to understand.

View Comments