According to W3C spec...
The contenteditable attribute is an enumerated attribute whose keywords are the empty string, true, and false. The empty string and the true keyword map to the true state.
All of the examples and documentation I've found represent the "empty string" as follows:
<div contenteditable="">...</div>
I'm wondering if the following is equally valid (cross-browser) for the sake of cleaner, briefer code:
<div contenteditable>...</div>
It works just fine - at least on current versions of Firefox and Chrome. I'm just wondering if it's valid and reliable cross-browser. My thinking is that it's comparable to form attributes like readonly, disabled, selected, etc - which are commonly and reliably used without assigning a value.
SOLUTION:
Marc B pointed out the following from the W3C spec:
Note that empty attribute syntax is exactly equivalent to specifying the empty string as the value for the attribute.
...which basically confirms the interchangeability of absent and empty values for boolean attributes/properties, meaning both code snippets above are valid and (should be) treated identically across browsers. Thanks to all who answered!