XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Boolean attributes in XHTML/HTML5

On 10/02/2012 14:02, Len Bullard wrote:
> Which doesn't answer the question why they didn't choose disabled="yes".

I wasn't involved but presumably because that would lead people to think 
that the attribute value mattered and that disabled="no" meant something 
different from disabled="yes". The point about boolean attributes as 
interpreted by browsers is that they are true if they are there (with 
any value) and false if they are not there.

so in html you have <foo> and <foo disabled> as markup, in XML where you 
need to supply a value, disabled="disabled" is valid for legacy reasons, 
disabled="" is valid because that's what people thought the syntax was 
anyway and anything else including disabled="no" acts the same way as 
disabled="" but is classed as non conforming (which only matters to 
validators not to browsers)

David


-- 
google plus: https:/profiles.google.com/d.p.carlisle

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS