Cascading Style Sheets

This book is a guide to Cascading Style Sheets (CSS), a technique widely used in web pages including Wikipedia to describe their visual style and appearance. CSS can take HTML to new places creatively and functionally. Once you learn how to style mark-up, you can additionally learn JavaScript functions that make dynamic web pages.

This book applies to all supported browsers in this wiki, powered by MediaWiki, see mw:Compatibility/Browser support matrix

This book applies to version 49 and newer of Chrome.

This book applies to version 49 and newer of Firefox.

This book applies to version 79 and newer of Edge.

This book applies to version 10 and newer of Safari.


Contents

edit
  1. Introduction
  2. Applying CSS to HTML and XHTML — linking, embedding and inlining
  3. Applying CSS to XML
  4. CSS Construction
    1. Syntax
    2. Defining Style Rules
    3. Lengths and Units
    4. Selectors
    5. Inheritance Rules
    6. The Important Keyword
  5. CSS Presentation
    1. Color
      1. Relative colors
    2. Fonts and Text
    3. Hyperlinks
    4. Pseudo Elements and Pseudo Classes
    5. Clipping
    6. Lists
    7. Box Model — setting the size and shape of elements
    8. Borders
    9. Background
    10. Shorthand Properties
    11. Cursor
    12. Gradients
    13. Sprites
    14. Interactivity
  6. CSS Layout
    1. Centering
    2. Positioning
    3. Tables
    4. Floating Elements
    5. Typography
    6. Media Types
    7. Multi-Column Layout
    8. z-index
    9. Flexbox
  7. CSS URI Schemes
    1. MHTML URIs
    2. Data URIs
  8. CSS Applications
    1. CSS Menus
    2. Breadcrumbs
    3. User Style Sheets
  9. Troubleshooting
    1. Standards Mode and Quirks Mode
    2. Browser Compatibility
    3. CSS Source Order (Troubleshooting the cascade of repeated selectors)
  10. Appendices
    1. Hacks and Filters
    2. Browser Extensions
    3. Links
    4. Index of Properties
    5. Index
    6. Glossary
    7. Detailed TOC
    8. Contributors
    9. To Do
    10. Archives
edit