W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2013

[whatwg] OUTPUT tag: clarify purpose in spec?

From: Richard Kennard <richard@kennardconsulting.com>
Date: Sun, 25 Aug 2013 06:48:20 +1000
Message-ID: <52191C14.8060700@kennardconsulting.com>
To: whatwg@lists.whatwg.org
Hi guys,

Thanks for all the great work you do on the HTML 5 specification!

Can I ask for a little clarification in the spec? Specifically it says:

     "The output element represents the result of a calculation or user action."
     http://www.w3.org/TR/html5/forms.html#the-output-element

It is my understanding (or hope!) that the output tag fills a hole in form markup. For example, if this is the editable version of a form:

     <label for="name">Name:</label><input id="name" type="text" value="Bob"/>

Then this can be its read-only variant:

     <label for="name" value="Name:"/><output id="name">Bob</output>

This is preferable to surrounding 'Bob' with span/div tags (or no markup). And it's more semantically correct than using label tags IMHO.

However the spec is not completely specific that this is what 'output' is for. Could perhaps the spec read:

     "The output element represents the result of a calculation or user action, or a read-only form control"

Essentially, I am taking 'result of a calculation' to include 'values looked up from database, REST call, etc'. Is that correct?

Regards,

Richard.
Received on Saturday, 24 August 2013 20:48:54 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:23 UTC