CSS

[4] This separation can improve content accessibility, since the content can be written without concern for its presentation; provide more flexibility and control in the specification of presentation characteristics; enable multiple web pages to share formatting by specifying the relevant CSS in a separate .css file, which reduces complexity and repetition in the structural content; and enable the .css file to be cached to improve the page load speed between the pages that share the file and its formatting.

Separation of formatting and content also makes it feasible to present the same markup page in different styles for different rendering methods, such as on-screen, in print, by voice (via speech-based browser or screen reader), and on Braille-based tactile devices.

[6] In addition to HTML, other markup languages support the use of CSS including XHTML, plain XML, SVG, and XUL.

Selectors may apply to the following: Classes and IDs are case-sensitive, start with letters, and can include alphanumeric characters, hyphens, and underscores.

Pseudo-classes are used in CSS selectors to permit formatting based on information that is not contained in the document tree.

One example of a widely used pseudo-class is :hover, which identifies content only when the user "points to" the visible element, usually by holding the mouse cursor over it.

[14] Non-zero numeric values representing linear measures must include a length unit, which is either an alphabetic code or abbreviation, as in 200px or 50vw; or a percentage sign, as in 80%.

Some units – cm (centimetre); in (inch); mm (millimetre); pc (pica); and pt (point) – are absolute, which means that the rendered dimension does not depend upon the structure of the page; others – em (em); ex (ex) and px (pixel)[clarification needed] – are relative, which means that factors such as the font size of a parent element can affect the rendered measurement.

All font colors, background styles, element alignments, borders, and sizes had to be explicitly described, often repeatedly, within the HTML.

CSS lets authors move much of that information to another file, the style sheet, resulting in considerably simpler HTML.

CSS can define color, font, text alignment, size, borders, spacing, layout and many other typographic characteristics, and can do so independently for on-screen and printed views.

Not only does this simplify web development by promoting reusability and maintainability, it also improves site performance because styles can be offloaded into dedicated .css files that browsers can cache.

Thus the selectors of the following rule result in the indicated specificity: Consider this HTML fragment: In the above example, the declaration in the style attribute overrides the one in the