concept

value-grammar — CSS reference

A formal CSS value definition describes accepted component sequences. Angle-bracket names refer to types or productions, literal keywords are written as themselves, and combinators and multipliers describe how parts combine. Grammar notation is documentation, not literal CSS to paste into a declaration.

Formal Syntax & Structure

css syntaxcss
<length-percentage> | auto

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS reference lab</title><style>#a {width:80px} #b {width:auto}</style><body><div id="parent"><div id="a">Sample</div><div id="b">Comparison</div></div></body></html>
CSS Reference