HTML usually does not allow spaces between attributes when attributes have values ββand these values ββare quoted.
Example ( Link / Source ):
There are no white spaces between attributes in HTML documents.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>no attribute space</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <p class="CLASS"title='TITLE'></p> </body> </html>
See the third line:
<p class="CLASS"title='TITLE'></p> ^^
Now, using an HTML snippet that changes doctype to HTML 5 ( <!DOCTYPE HTML> ), does an experimental W3C HTML 5 check to report an error:
Test Result: 1 Error
Error line 9, Column 22: There is no space between the attributes.
<p class="CLASS"title='TITLE'></p> ^
So, I thought HTML 5 was backward compatible with the way browsers actually handle HTML, and AFAIK browsers do this well. At least I'm a little puzzled. I also have problems decoding (somewhat unnecessary) compiled HTML 5 specifications to be accurate at this point, because what I found (W3C again, see http://www.w3.org/TR/ html-markup / syntax.html # syntax-attributes ) without saying that this (may and should not) be a mistake.
html
hakre
source share