4 ms·
What takes fewer lines of code to parse? <element.name id.value="3.14"> Or accepting both: <element.name id.value="3.14"> <element.name id.value=
by thangalin 10y ago
What takes fewer lines of code to parse?
<element.name id.value="3.14">
Or accepting both:
<element.name id.value="3.14">
<element.name id.value=3.14>
How would you specify an empty value for mandatory attributes?
- colejohnson66 10y agoI've seen empty values written as <tag attr1 attr2="val">data</tag> Whether that's legal or not, I don't know.
- oceanswave 10y agonot valid. wondering if you've seen that within HTML, where it is valid.
- colejohnson66 10y agoActually, now that you mention it, I think it's from Chrome's Inspect Element tool, but I can't check right now. I think if you wrote something like <div class="">...</div> it would display in the tool as <div class>...</div>
- kozak 10y agoChrome's Inspect Element shows you the non-serialized DOM structure, which means it's neither XML nor HTML at that point.