keyword

Canvas — CSS reference

Background used for document content. The actual value depends on the browser, color scheme and user palette; do not assume a fixed RGB value. Pair foreground and background appropriately. This example uses a matching palette pair, not a contrast certification.

Formal Syntax & Structure

css syntaxcss
background-color: Canvas;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>Canvas</title><style>body{margin:8px;font:16px/1.5 sans-serif}*{box-sizing:border-box}#a{background:Canvas;color:CanvasText;padding:12px}#b{background-color:Canvas}</style><body><p id="a">System palette sample</p><span id="b">Comparison</span></body></html>
CSS Reference