This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12938 - “The attribute value can remain unquoted if it doesn't contain spaces or […]” Please replace “spaces” with “space characters” (microsyntax) to avoid confusion.
Summary: “The attribute value can remain unquoted if it doesn't contain spaces or […]”...
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
Depends on:
Reported: 2011-06-11 06:58 UTC by contributor
Modified: 2011-08-19 05:50 UTC (History)
5 users (show)

See Also:


Description contributor 2011-06-11 06:58:12 UTC

“The attribute value can remain unquoted if it doesn't contain spaces or
[…]” Please replace “spaces” with “whitespace” to avoid confusion.

Posted from:
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.786.0 Safari/535.1
Comment 1 Mathias Bynens 2011-06-11 07:02:13 UTC
All kinds of whitespace characters are disallowed in attribute values. For example, these two will have the exact same result:

    <!-- spaces -->
    <p id=foo  bar>
    <!-- tabs -->
    <p id=foo			bar>

Obviously, `bar` will be considered as a separate attribute, and won’t be part of the @id attribute value.
Comment 2 Mathias Bynens 2011-06-12 17:03:57 UTC
> The value, along with the = character, can be omitted altogether if the value is the empty string.

I believe “can” is supposed to be “should” here. <p id=> isn’t conformant.
Comment 3 Mathias Bynens 2011-06-12 17:06:34 UTC
Also, perhaps a link to somewhere from this section would be useful.
Comment 4 Michael[tm] Smith 2011-08-04 05:14:38 UTC
mass-move component to LC1
Comment 5 Ian 'Hixie' Hickson 2011-08-19 02:58:32 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:

Status: Partially Accepted
Change Description: see diff given below

Please file only one issue per bug.

For comment 0: I've changed it to "space characters" which has a more precise defined meaning. However, note that this entire section is very vague and isn't really trying to be precise. It's just an introduction. If someone wants the exact rules they should look at the actual rules.

For comment 1: No actionable feedback.

For comment 2: No, this is not a normative section.

For comment 3: There is already a link to that section in the very sentence quoted in comment 0.
Comment 6 contributor 2011-08-19 02:59:10 UTC
Checked in as WHATWG revision r6514.
Check-in comment: Add a cross-ref here to make it easier to see what is meant.