CSS Reference
A CSS reference is a structured lookup of every property the browser understands. Use it like a dictionary while you're writing CSS.
What a reference page typically lists
| Field | Example |
|---|---|
| Syntax | color: <color> |
| Initial value | canvastext (system colour) |
| Applies to | All elements |
| Inherited | Yes |
| Animatable | Yes |
| Computed value | Computed colour |
Browse the reference
- All selectors
- All functions (
calc,clamp,var, …) - Units (px, %, em, rem, fr, vh, …)
- Colour keywords
- Colour value formats
- Animatable properties
- Browser support
Tip: The official spec at
w3.org/TR/css/ is the ultimate reference — but it's dense. MDN's CSS reference is the friendlier read.Example
Example
<!DOCTYPE html>
<html>
<head>
<style>
body { font-family: Verdana, sans-serif; }
.box { background: #04AA6D; color: #fff; padding: 20px; border-radius: 6px; }
</style>
</head>
<body>
<h1>CSS Reference</h1>
<div class="box">Edit the CSS on the left, then click Run »</div>
</body>
</html>
Try it Yourself »
Exercise
A widely-trusted external CSS reference is…
Answer (3 letters):
The Mozilla Developer Network.
Discussion
Loading…