Thanks , I had that feeling... I'll test it by tomorrow ... is there
any links related to this being illegal ? just for my notetaker
pad ...
If ever you have any markup and you just want to check whether it is
legal you can paste it into the w3c html validator and it will check
it for you. In fact any time a page is misbehaving in a strange way
it is a good idea to check the html for validity, and before any page
is made public it should be checked. Even if a page looks ok there
may still be invalid html there which can make it perform differently
on different browsers.
Since I didn't see the rest of this I'll just comment as if it's
future-proofed markup. In HTML5 <form /> simply means <form>, it's a
grey area, it's not allowed but it's parsed and even has parsing rules
but it means <form> so you will end up with a parsing error eventually
possibly. It has parsing rules because of XML and XHTML. It does not
mean <form></form> like most people assume.
While I agree with Colin that you should check with the W3 validator I
also think that you should take any of the HTML5 markup validations
with a grain of salt and refer to the spec
HTML Standard because there are grey areas that will
get you later.
Thanks , I had that feeling... I'll test it by tomorrow ... is there
any links related to this being illegal ? just for my notetaker
pad ...
If ever you have any markup and you just want to check whether it is
legal you can paste it into the w3c html validator and it will check
it for you. In fact any time a page is misbehaving in a strange way
it is a good idea to check the html for validity, and before any page
is made public it should be checked. Even if a page looks ok there
may still be invalid html there which can make it perform differently
on different browsers.
Since I didn't see the rest of this I'll just comment as if it's
future-proofed markup. In HTML5 <form /> simply means <form>, it's a
grey area, it's not allowed but it's parsed and even has parsing rules
but it means <form> so you will end up with a parsing error eventually
possibly. It has parsing rules because of XML and XHTML. It does not
mean <form></form> like most people assume.
I don't understand what you mean by "it's not allowed". If it parses
without an error then how can it not be allowed? Or are you pointing
out that the spec is inconsistent?
That’s not legal markup. Either wrap the form around the entire table
or put it completely inside a cell.
Although haml doesn’t know that - it will quite happily generate markup that is invalid in that way. My money would be the the tr is indented with something that looks like a space to a human, but not to haml (maybe a tab or one of the funky unicode spacing characters)
That's exactly what I mean by a grey area, it's one of those things
that you're not supposed to do, it's "not allowed" but they allow it
to parse and pass because it's so popular and because it was so widely
used prior to HTML5 via XHTML from XML, that and it's converted to
<tag> which is perfectly valid in some circumstance. I don't quite
remember if there was intent to make it fully illegal but right now
it's a grey area in that it parses but you are not supposed to do it
because it's "not allowed" in HTML5.
TL;DR
<form /> -> <form> = valid but could lead to parse error because of
nesting issues.
<form /> is not legal in HTML5 but parsed and "passed" because of
syntactic sugar and XML.