Place your text ad here.
World class data recovery software and renowned raid recovery services
WestNIC provides reliable web hosting services
Free software downloads and drivers download resources
Ahosting.biz reseller hosting, managed dedicated server with 24/7 support
This document is a glossary of terms used in relation to CSS and is part of the CSS style guide section of Code Style. If you cannot find the term you are seeking defined here, please use the article feedback form below to request a definition.
A syntax for specifying a CSS selector by means of a general purpose, repeatable class attribute of an element. The name of class selectors in style rules is preceded by a full stop or period, ., e.g.:
.Condensed{
letter-spacing: 0.1em;
}
A syntax for specifying a CSS selector by means of the context in which an element or attribute occurs in the markup structure of a document. In CSS level 1, the syntax takes the form of the element names in a space separated sequence. For instance, contextual selectors may refer to a strong element within a dt element, or a p element with the class attribute "Classic" enclosing an abbr element:
DT STRONG{
font-weight: bold;
letter-spacing: 0.2em;
}
P.Classic ABBR{
font-style: italic;
}
A corresponding pair of property and value parameters which suggests a CSS style for a given selector. Numerous declarations can be made in the same style rule, with a trailing semicolon after each, enclosed by a pair of curly braces. In the following example color: red is a single declaration, background: white; is a second:
EM{
color: red;
background: white;
}
Note that a trailing semicolon is not strictly required after the last declaration, but using them always may help avoid syntax errors when editing stylesheets.
An HTML or markup element to which a CSS declaration might be associated. A named element is the simplest form of CSS selector.
A convenient means of specifying a range of selectors in a comma separated list to which the same style declaration applies, e.g.:
H1, H2, H3{
font-family: serif;
font-weight: bold;
}
A syntax for specifying a CSS selector by means of a unique id attribute of an element. The name of id selectors in style rules is preceded by a hash or pound symbol, #, e.g.:
#Subtitle{
letter-spacing: 0.1em;
}
A named style attribute or parameter for a markup element specified in a stylesheet declaration, e.g. color, background, font-family, margin etc., which is assigned a specific value. Properties are always followed by a colon to separate them from their value pair.
A syntax for selecting markup elements which have subsidiary or context-sensitive attributes in the context of document navigation or positioning, including hyperlinks. The state of these "false" classes in a elements in particular may help indicate that a hyperlinked document has been visited, but this condition is not specified by an explicit class or id attribute of the element, e.g.:
A:visited{
color: purple;
background: white;
}
Other pseudo class selectors include first-letter and first-line, which are determined by the position of text in p elements for instance.
P:first-letter{
font-size: larger;
}
The complete specification of an individual style including the selector, property and value. The term rule applies whatever form the selector takes and however many declaration pairs are present.
A logical "handle" or identifier by which style declarations are associated with specific elements of a document. Selectors may apply broadly to a named HTML element, such as <h3> or <p>, an HTML element with a named attribute value, particularly a class or id value. A simple selector is one which matches an element name only.
See also: grouped selector and contextual selector.
A collection of one or more style rules, specified in an HTML style element or external CSS file attached by an HTML link element. CSS stylesheets have the content type text/css, typically have the file extension .css and may specify one or more media types to which the styles should be applied:
<link
rel="stylesheet"
type="text/css"
href="Stylesheet.css"
media="screen">
<style
type="text/css"
media="print">
H1, H2, H3{
font-family: sans-serif;
}
</style>
A software application which is used to view a document to which styles have been applied. Typically, this would be a Web browser which visually displays HTML, but CSS can be applied to content for a range of media devices which have media specific style properties.
See also CSS2 media stylesheet glossary.
A length, quality, type or URL assigned to a style property for an element. CSS properties each have specific ranges of value or token types which may be declared for them. For instance, color properties have values specified by named color tokens (silver, purple, maroon), or RGB colour components in the decimal range 0 to 255 or hexadecimal equivalent. Other style properties take length values, URL values or other tokens such as float, repeat-y and both, which define how an element is rendered in a specific user agent.