FANDOM


Programmer's Wiki
This page has been moved to the Programmer's Wiki.
Please do not make any changes or additions to this page.

Any modifications, if still appropriate, should be made on CSS at the Programmer's Wiki.

CSS, or Cascading StyleSheets, is a set of rules for formatting web documents. CSS rules can be inserted into individual HTML tags or implemented as an internally- or externally-sourced stylesheet definition. CSS is used in conjunction with HTML to add formatting to the document's presentation. Current standards for both CSS and HTML can be found in the W3C specification.

ExampleEdit

Here is an example of a stylesheet implemented in a web page.

<style>

  h1 { color: red; }
  h2 { color: blue; }

  p { background-color: green;
    font-size: 15px;
    font-family: tahoma; }

</style>

Before the curly braces is the name of the tag or group whose formatting is being altered. Inside the curly braces is the formatting applied to that tag or group. The format of style definitions in the stylesheet is similar to inline style definitions.

According to this stylesheet, all instances of the h1 tag will colored red, all h2 tags will be colored blue, and all p tags will have a background color of green and be written in size 15 (pixels) Tahoma.

AttributesEdit

General information about attributes.

Global AttributesEdit

Information about styles that are common to all tags should go here. See Reference Section for good sources of information.

Attributes by TagEdit

A link or a simple index should go here detailing information about the various attributes available to different tags.

SelectorsEdit

Information about selectors should go here:

a[.classname][#id][:link|:visited|:hover|:active]

More ExamplesEdit

More examples here with the formatting shown, perhaps layed out in a table.

BrowsersEdit

Information about the CSS support in different browsers.

ReferencesEdit

  1. W3C Specification
  2. W3Schools CSS Tutorial
  3. HTML (& CSS) Code Tutorial

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.