The CSS Object Model (CSSOM), part of the DOM, exposes specific interfaces allowing manipulation of a wide amount of information regarding CSS. Initially defined in the DOM Level 2 Style recommendation, these interfaces forms now a specification, CSS Object Model (CSSOM) which aims at superseding it.
Comments are used to add explanatory notes or prevent the browser from interpreting parts of the stylesheet.
The basic goal of the Cascading Stylesheet (CSS
) language is to allow a browser engine to paint elements of the page with specific features, like colors, positioning, or decorations. The CSS syntax
reflects this goal and its basic building blocks are:
A formal grammar, the CSS value definition syntax, is used for defining the set of valid values for a CSS property or function. In addition to this syntax, the set of valid values can be further restricted by semantic constraints (like, for a number to be strictly positive).
The Web platform provides several ways to get notified of DOM events
. Two common styles are: the generalized
and a set of specific on-event
handlers. This page focuses on the details of how the latter work.
Attribute selectors select an element using the presence of a given attribute or attribute value.
combinator separates two selectors and matches only those elements matched by the second selector that are direct
children of elements matched by the first. By contrast, when two selectors are combined with the descendant selector
, the combined selector expression matches those elements matched by the second selector for which there exists an ancestor element matched by the first selector, regardless of the number of "hops" up the DOM.
Specificity is the means by which browsers decide which CSS property values are the most relevant to an element and, therefore, will be applied. Specificity is based on the matching rules which are composed of CSS selectors of different sorts.
HTML (Hypertext Markup Language) elements are usually either "block-level" elements or "inline" elements. A block-level element occupies the entire space of its parent element (container), thereby creating a "block." This article helps to explain what this means.
The width CSS descriptor is shorthand for setting both the min-width and the max-width of the viewport. By providing one viewport length value, that value will determine both the min-width and the max-width to the value provided.
The Selectors API provides methods that make it quick and easy to retrieve
(often shortened to JS
) is a lightweight, interpreted, object-oriented language with first-class functions
, and is best known as the scripting language for Web pages, but it's used in many non-browser environments
as well. It is a prototype-based
, multi-paradigm scripting language that is dynamic, and supports object-oriented, imperative, and functional programming styles.
defines a webpage's structure and content and CSS
adds interactivity to a webpage and creates rich web applications.
In an HTML document, CSS class selectors match an element based on the contents of the element's class attribute. The
attribute is defined as a space-separated list of items, and one of those items must match exactly the class name given in the selector.