It is currently Sat Dec 02, 2017 4:15 pm Advanced search
the quotes surrounding the value may also be omitted in most cases. The value may contain any characters except for spaces, single or double quotes (' or "), an equals sign (=) or a greater-than symbol (>). If you need an attribute to contain those characters, they either need to be escaped using character references, or you need to use either the single- or double-quoted attribute values.
Browser vendors are not spending any time on "guessing" what is an attribute and what is a value. It's well-defined how to parse it, and everyone has done it from the start.JAB Creations wrote:Genius!
<div class=class1 class2
Instead of having browser vendors spend time on important things like CSS3 let's force them to guess what is an attribute and what is a value!
It does.RobS wrote:If attributes can be unquoted, then the spec needs to indicate whether a parser needs to be greedy or stingy when consuming characters as an attribute value.
It would be part of the attribute value.RobS wrote:For example, if parsing a plain text file (ex: a "file:....html" file on disk) as an HTML file and it encounters the following (bad) code:
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta name=robots content=index/></head><body><a id=hidden-link href=http://www.ExampleOnly.com/></a></body></html>
would the last "/" in <meta/> and <a> be part of the attribute or of "/>" indicating an empty tag?
Why would it be handled differently for different tags?RobS wrote:In this case it's pretty obvious that it's part of the tag in the first case and part of the attribute in the second case, but how would the parser know that? It might know that "meta" is a void element, but the "a" seems a bit tougher without any HTTP headers to assist. Maybe it needs to be stingy for void tags and greedy for others?
JAB Creations wrote:This is a massive waste of resources and time. Letting clearly broken code be seen as valid opens up a debate about how such code should be parsed. It also degrades the expected level of quality expected of programmers. Instead of allowing trash code the WHATWG group could spend it's time on much more important needs of the web.
JAB Creations wrote:then it's one of the reasons why I won't adopt HTML5
Return to Feedback on the Specs
Users browsing this forum: No registered users and 0 guests