Cascading Style Sheets CSS :: webDev

Working With HSL In CSS

HSL Color Model In CSS

The RGB color system is an additive model in which red, green, and blue are combined in various ways to reproduce other colors. The RGB system was formally introduced in HTML3.2 and CSS1, but was used in HTML versions before that as well.

CSS2 has five ways of interpreting RGB colors:

  • using a full hex combination: #FF0000
  • using a shorthand hex combination: #F00 (equals #FF0000)
  • using a comma-separated list of three numerical integer values: rgb(255, 0, 0)
  • using a comma-separated list of three numerical percentage values: rgb(100%, 0%, 0%)
  • using a color keyword (sometimes referred as named color), f ex red or maroon

Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation (that is, the look and formatting) of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can be applied to any kind of XML document, including SVG and XUL.

CSS is designed primarily to enable the separation of document content (written in HTML or a similar markup language) from document presentation, including elements such as the colors, fonts, and layout. This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple pages to share formatting, and reduce complexity and repetition in the structural content (such as by allowing for tableless web design). CSS can also allow the same markup page to be presented in different styles for different rendering methods, such as on-screen, in print, by voice (when read out by a speech-based browser or screen reader) and on Braille-based, tactile devices. While the author of a document typically links that document to a CSS stylesheet, readers can use a different stylesheet, perhaps one on their own computer, to override the one the author has specified.

CSS specifies a priority scheme to determine which style rules apply if more than one rule matches against a particular element. In this so-called cascade, priorities or weights are calculated and assigned to rules, so that the results are predictable.

The CSS specifications are maintained by the World Wide Web Consortium (W3C). Internet media type (MIME type) text/css is registered for use with CSS by RFC 2318 (March 1998).

Cascading Style Sheets CSS :: webDev