Cascading Style Sheet Knowledge Base
CSS Terminology
CSS Terminology Source
CSS Level 1 Terminology
Property NameDescriptionCSS LevelRefRemark attributeโ1โHTML attributelast updated 23 Jan 2019authorโ1โthe author of an HTML documentlast updated 23 Jan 2019block-level elementโ1โan element which has a line break before and after (e.g. 'H1' in HTML)last updated 23 Jan 2019canvasโ1โthe part of the UA's drawing surface onto which documents are renderedlast updated 23 Jan 2019child elementโ1โa subelement in SGML [5] terminologylast updated 23 Jan 2019contextual selectorโ1โa selector that matches elements based on their position in the document structure. A contextual selector consists of several simple selectors. E.g., the contextual selector 'H1.initial B' consists of two simple selectors, 'H1.initial' and 'B'.last updated 23 Jan 2019CSSโ1โCascading Style Sheetslast updated 23 Jan 2019CSS1โ1โCascading Style Sheets, level 1. This document defines CSS1 which is a simple style sheet mechanism for the web.last updated 23 Jan 2019CSS1 advanced featuresโ1โfeatures that are described in this specification but labeled as not among the CSS1 core featureslast updated 23 Jan 2019CSS1 core featuresโ1โthe part of CSS1 that is required in all CSS1 conforming UAslast updated 23 Jan 2019CSS1 parserโ1โa User Agent that reads CSS1 style sheetslast updated 23 Jan 2019declarationโ1โa property (e.g. 'font-size') and a corresponding value (e.g. '12pt')last updated 23 Jan 2019designerโ1โthe designer of a style sheetlast updated 23 Jan 2019documentโ1โHTML documentlast updated 23 Jan 2019elementโ1โHTML elementlast updated 23 Jan 2019element typeโ1โa generic identifier in SGML [5] terminologylast updated 23 Jan 2019fictional tag sequenceโ1โa tool for describing the behavior of pseudo-classes and pseudo-elementslast updated 23 Jan 2019font sizeโ1โThe size for which a font is designed. Typically, the size of a font is approximately equal to the distance from the bottom of the lowest letter with a descender to the top of the tallest letter with an ascender and (optionally) with a diacritical mark.last updated 23 Jan 2019HTMLโ1โHypertext Markup Language [2], an application of SGML.last updated 23 Jan 2019HTML extensionโ1โMarkup introduced by UA vendors, most often to support certain visual effects. The "FONT", "CENTER" and "BLINK" elements are examples of HTML extensions, as is the "BGCOLOR" attribute. One of the goals of CSS is to provide an alternative to HTML extensions.last updated 23 Jan 2019inline elementโ1โan element which does not have a line break before and after (e.g. 'STRONG' in HTML)last updated 23 Jan 2019intrinsic dimensionsโ1โthe width and height as defined by the element itself, not imposed by the surroundings. In this specification it is assumed that all replaced elements -- and only replaced elements -- come with intrinsic dimensions.last updated 23 Jan 2019parent elementโ1โthe containing element in SGML [5] terminologylast updated 23 Jan 2019propertyโ1โa stylistic parameter that can be influenced through CSS. This specification defines a list of properties and their corresponding values.last updated 23 Jan 2019pseudo-classโ1โpseudo-classes are used in CSS selectors to allow information external to the HTML source (e.g. the fact that an anchor has been visited or not) to classify elements.last updated 23 Jan 2019pseudo-elementโ1โpseudo-elements are used in CSS selectors to address typographical items (e.g. the first line of an element) rather than structural elements.last updated 23 Jan 2019readerโ1โthe person for whom the document is renderedlast updated 23 Jan 2019replaced elementโ1โan element that the CSS formatter only knows the intrinsic dimensions of. In HTML, 'IMG', 'INPUT', 'TEXTAREA', 'SELECT' and 'OBJECT' elements can be examples of replaced elements. E.g., the content of the 'IMG' element is often replaced by the image that the SRC attribute points to. CSS1 does not define how the intrinsic dimensions are found.last updated 23 Jan 2019ruleโ1โa declaration (e.g. 'font-family: helvetica') and its selector (e.g. 'H1')last updated 23 Jan 2019selectorโ1โa string that identifies what elements the corresponding rule applies to. A selector can either be a simple selector (e.g. 'H1') or a contextual selector (e.g. 'H1 B') which consists of several simple selectors.last updated 23 Jan 2019SGMLโ1โStandard Generalized Markup Language [5], of which HTML is an applicationlast updated 23 Jan 2019simple selectorโ1โa selector that matches elements based on the element type and/or attributes, and not he element's position in the document structure. E.g., 'H1.initial' is a simple selector.last updated 23 Jan 2019single quotes ('...')โ1โdenote HTML and CSS excerpts.last updated 23 Jan 2019style sheetโ1โa collection of ruleslast updated 23 Jan 2019UAโ1โUser Agent, often a web browser or web clientlast updated 23 Jan 2019userโ1โsynonymous with readerlast updated 23 Jan 2019weightโ1โthe priority of a rulelast updated 23 Jan 2019
CSS Level 2, 2.1 Definitions
Property NameDescriptionCSS LevelRefRemark Ancestorโ2, 2.1, 2.2WDโAn element A is called an ancestor of an element B, if and only if B is a descendant of A.last updated 21 Jan 2019Attributeโ2, 2.1, 2.2WDโA value associated with an element, consisting of a name, and an associated (textual) value.last updated 21 Jan 2019Authorโ2, 2.1, 2.2WDโAn author is a person who writes documents and associated style sheets. An authoring tool <ins>is a User Agent that</ins> generates <del>documents and associated </del>style sheets.last updated 21 Jan 2019Childโ2, 2.1, 2.2WDโAn element A is called the child of element B if and only if B is the parent of A.last updated 21 Jan 2019Contentโ2, 2.1, 2.2WDโThe content associated with an element in the source document<del>; not all</del><ins>. Some</ins> elements have <ins>no</ins> content<ins>,</ins> in which case they are called empty. The content of an element may include text, and it may include a number of sub-elements, in which case the element is called the parent of those sub-elements.last updated 21 Jan 2019Descendantโ2, 2.1, 2.2WDโAn element A is called a descendant of an element B, if either (1) A is a child of B, or (2) A is the child of some element C that is a descendant of B.last updated 21 Jan 2019Document languageโ2, 2.1, 2.2WDโThe encoding language of the source document (e.g., HTML, <del>or an XML application</del><ins>XHTML, or SVG</ins>). <ins>CSS is used to describe the presentation of document languages and CSS does not change the underlying semantics of the document languages.</ins>last updated 21 Jan 2019Document treeโ2, 2.1, 2.2WDโThe tree of elements encoded in the source document. Each element in this tree has exactly one parent, with the exception of the root element, which has none.last updated 21 Jan 2019Elementโ2, 2.1, 2.2WDโ(An SGML term, see [ISO8879].) The primary syntactic constructs of the document language. Most CSS style sheet rules use the names of these elements (such as P, TABLE, and OL in HTML) to specify <del>rendering information for them</del><ins>how the elements should be rendered</ins>.last updated 21 Jan 2019Following elementโ2, 2.1, 2.2WDโAn element A is called a following element of an element B, if and only if B is a preceding element of A.last updated 21 Jan 2019Ignoreโ2.1, 2.2WDโThis term has two slightly different meanings in this specification. First, a CSS parser must follow certain rules when it discovers unknown or illegal syntax in a style sheet. The parser must then ignore certain parts of the style sheets. The exact rules for which parts must be ignored are described in these sections (Declarations and properties, Rules for handling parsing errors, Unsupported Values) or may be explained in the text where the term "ignore" appears. Second, a user agent may (and, in some cases must) disregard certain properties or values in the style sheet, even if the syntax is legal. For example, table-column elements cannot affect the font of the column, so the font properties must be ignored.last updated 21 Jan 2019Intrinsic dimensionsโ2, 2.1, 2.2WDโThe width and height as defined by the element itself, not imposed by the surroundings. <del>In CSS2 it is assumed that all replaced elements -- and only replaced elements -- come with intrinsic dimensions.</del><ins>CSS does not define how the intrinsic dimensions are found. In </ins><del>CSS 2.1</del><ins>CSS 2.2</ins><ins> only replaced elements can come with intrinsic dimensions. For raster images without reliable resolution information, a size of 1 px unit per image source pixel must be assumed.</ins>last updated 21 Jan 2019Preceding elementโ2, 2.1, 2.2WDโAn element A is called a preceding element of an element B, if and only if (1) A is an ancestor of B or (2) A is a preceding sibling of B.last updated 21 Jan 2019Propertyโ2.1, 2.2WDโCSS defines a finite set of parameters, called properties, that direct the rendering of a document. Each property has a name (e.g., 'color', 'font', or border') and a value (e.g., 'red', '12pt Times', or 'dotted'). Properties are attached to various parts of the document and to the page on which the document is to be displayed by the mechanisms of specificity, cascading, and inheritance (see the chapter on Assigning property values, Cascading, and Inheritance).last updated 21 Jan 2019Rendered contentโ2, 2.1, 2.2WDโThe content of an element after the rendering that applies to it according to the relevant style sheets has been applied. <del>The rendered content of a replaced element comes from outside the source document.</del><ins>How a replaced element's content is rendered is not defined by this specification.</ins> Rendered content may also be alternate text for an element (e.g., the value of the XHTML "alt" attribute), and may include items inserted implicitly or explicitly by the style sheet, such as bullets, numbering, etc.last updated 21 Jan 2019Replaced elementโ2, 2.1, 2.2WDโ<del>An element for which the CSS formatter knows only the intrinsic dimensions. In HTML, IMG, INPUT, TEXTAREA, SELECT, and OBJECT elements can be examples of replaced elements. For example, the content of the IMG element is often replaced by the image that the "src" attribute designates. CSS does not define how the intrinsic dimensions are found.</del><ins>An element whose content is outside the scope of the CSS formatting model, such as an image, embedded document, or applet. For example, the content of the HTML IMG element is often replaced by the image that its "src" attribute designates. Replaced elements often have intrinsic dimensions: an intrinsic width, an intrinsic height, and an intrinsic ratio. For example, a bitmap image has an intrinsic width and an intrinsic height specified in absolute units (from which the intrinsic ratio can obviously be determined). On the other hand, other documents may not have any intrinsic dimensions (for example, a blank HTML document).<br />User agents may consider a replaced element to not have any intrinsic dimensions if it is believed that those dimensions could leak sensitive information to a third party. For example, if an HTML document changed intrinsic size depending on the user's bank balance, then the UA might want to act as if that resource had no intrinsic dimensions.<br />
The content of replaced elements is not considered in the CSS rendering model.</ins>last updated 21 Jan 2019Siblingโ2, 2.1, 2.2WDโAn element A is called a sibling of an element B, if and only if B and A share the same parent element. Element A is a preceding sibling if it comes before B in the document tree. Element B is a following sibling if it comes after A in the document tree.last updated 21 Jan 2019Source documentโ2, 2.1, 2.2WDโThe document to which one or more style sheets <del>refer</del><ins>apply</ins>. This is encoded in some language that represents the document as a tree of elements. Each element consists of a name that identifies the type of element, optionally a number of attributes, and a (possibly empty) content. <ins>For example, the source document could be an XML or SGML instance.</ins>last updated 21 Jan 2019Style sheetโ2, 2.1, 2.2WDโA set of statements that specify presentation of a document.<br />Style sheets may have three different origins: author, user, and user agent. The interaction of these sources is described in the section on cascading and inheritance.last updated 21 Jan 2019Userโ2, 2.1, 2.2WDโA user is a person who interacts with a user agent to view, hear, or otherwise use a document and its associated style sheet. The user may provide a personal style sheet that encodes personal preferences.last updated 21 Jan 2019User agent (UA)โ2, 2.1, 2.2WDโA user agent is any program that interprets a document written in the document language and applies associated style sheets according to the terms of this specification. A user agent may display a document, read it aloud, cause it to be printed, convert it to another format, etc.<br /><ins>An HTML user agent is one that supports one or more of the HTML specifications. A user agent that supports XHTML [XHTML], but not HTML is not considered an HTML user agent for the purpose of conformance with this specification.</ins>last updated 21 Jan 2019Valid style sheetโ2, 2.1, 2.2WDโThe validity of a style sheet depends on the level of CSS used for the style sheet. All valid CSS1 style sheets are valid <del>CSS2</del><del><ins>CSS 2.1</ins></del><ins>CSS 2.2</ins> style sheets<del>. However,</del><ins>, but</ins> some changes from CSS1 mean that a few CSS1 style sheets will have slightly different semantics in <del>CSS2</del><del><ins>CSS 2.1</ins></del><ins>CSS 2.2</ins>. <ins>Some features in CSS2 are not part of <del>CSS 2.1</del></ins><ins>CSS 2.2</ins><ins>, so not all CSS2 style sheets are valid <del>CSS 2.1</del></ins><ins>CSS 2.2</ins><ins> style sheets.</ins><br />A valid <del>CSS2</del><del><ins>CSS 2.1</ins></del><ins>CSS 2.2</ins> style sheet must be written according to the grammar of <del>CSS2</del><del><ins>CSS 2.1</ins></del><ins>CSS 2.2</ins>. Furthermore, it must contain only at-rules, property names, and property values defined in this specification. An illegal (invalid) at-rule, property name, or property value is one that is not valid.last updated 21 Jan 2019