HTML and CSS Reference
In-Depth Information
What Is CSS?
CSS, short for Cascading Style Sheets, is a language for describing the
presentational properties of content elements in structured documents
such as HTML documents. Though this topic will focus on styling HTML
content, you can also use CSS for other structured documents such as
those created with XML or SVG.
What Are Styles Sheets?
Style sheets provide a set of guidelines for styling a structured docu-
ment by defining rules for the appearance of different types of content
or different contexts that content can be found in. You may have already
encountered forms of style sheets or themes in typical office suites
or e-mail programs. It is common in presentation software such as
PowerPoint or Keynote to pick a theme to start with, where each slide
is automatically formatted with the same font sizes, colors, and layouts,
rather than starting with a blank slate and designing each slide individu-
ally and hoping for them to be consistent when you're done.
As a browser or other user agent loads the HTML content for the docu-
ment, it also loads the style sheet information. From this style sheet
information, it then builds up the set of presentation rules for each
individual content item based on its element type, its state, and its loca-
tion in the document. It will ultimately render each element consistently
based on this accumulated set of rules.
Anatomy of a Statement
CSS-based style sheets consist of a list of statements. There are two types
of statements: rule sets (referred to as rules ) and at-rules.
Search WWH ::

Custom Search