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