demosthenes.info

A blog by Dudley Storey on , , , , , , and anything else that strikes his fancy.

featured articles

popular favourites

css syntax

CSS Syntax

Style rules in a linked or embedded style sheet are written in the same way. The thing we are influencing – the selector – opens the rule. At the simplest level, the selector is simply an element that we wish to change the appearance of universally, but we will encounter variations on this very shortly. Following the selector, and inside curly braces, is the style declaration: a set of style rules, written as property and value pairs, with colons between each. A semi-colon is placed after each value to separate it from the next rule in the declaration.

Inline styles use the same declaration format, but make the rules the value of a style attribute of an element:

  1. <p style=“color: red; font-size: larger;”>

web developer guide

featured comment

by JoelB in Goodbye, JQuery Validation: HTML5 Form Errors With CSS3

what i'm reading

A Storm of Swords: A Song of Ice and Fire: Book Three
A Storm of Swords: A Song of Ice and Fire: Book Three

what i'm watching

Californication: The Third Season
Californication: The Third Season

what i'm playing

Mass Effect 3 Collector's Edition
Mass Effect 3 Collector's Edition

what i'm hearing

Dub FX
Dub FX

blogs

podcasts

no ads ever

This blog is free of advertising, and always will be.

creative commons licensed

The content of this blog is free to use in whatever way you wish under the Creative Commons license.