freecoding.school100% FREE · NO SIGNUP
The Old NetISSUE #9 of 60

attribute values · always quoted

Pixel PeteVSQuirks Mode
Pixel Pete saysAll attribute values must be wrapped in quotes — single or double.

HTML allows unquoted values for simple cases (width=100); XHTML never does. Every value needs quotes: width="100". This avoids ambiguity when values contain spaces or special characters and is a universally good habit even in HTML5.

Power-ups you unlock

Quirks Mode attacks — common mistakes

Boss battleAdd quotes to every unquoted attribute in a snippet.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>invalid: &lt;td colspan=2 width=100&gt;
valid:   &lt;td colspan="2" width="100"&gt;</pre></body></html>
▶ Open the interactive comic issue
‹ Proper Nesting · No Overlap AllowedBoolean Attributes · Expanded Form ›