There is no need to include the slider at the end of the widget, although this is permitted in the case of null items, for the joy of XML fanatics:
[About opening tags syntax]
6. Then, if the element is one of the void Elements, or if the element is a Foreign element, then there may be a single "/" (U+002F) Character. This Character has no Effect on void Elements, but on Foreign Elements it Marks the start tag as self-closing.
Free translation:
If the element is one of the null elements, or if it is a foreign element, then a single character "/" (U+002F) can be included. This character has no effect on null elements, but on foreign elements marks the opening tag as auto-closed.
So in HTML5 both options below are valid* for the tag meta
:
<meta charset=utf-8>
<meta charset=utf-8 />
(I personally find the first option preferable, because it is cleaner.)
The text of the specification that you quoted says:
Void Elements only have a start tag; end tags must not be specified for void Elements
That is to say:
Null elements have only one opening tag; closing tags should not be used on null elements.
This means a closing tag </meta>
is invalid, not that <meta />
is invalid.
In XML, or XHTML, when you write something like <img />
, that amounts to <img></img>
. The slash at the end is just a shortcut to indicate to parser that the tag is being closed, with no content, since in XML all tags must be closed. HTML5 is not XML, and does not work in the same way.
* W3C validator says HTML5 support is experimental, but I believe for this case the result is reliable
Related (English): http://stackoverflow.com/questions/3558119/are-self-closing-tags-valid-in-html5
– Sergio
@Sergio had already read, but this question and its answers is a big mess... initially the question had an error in the code instead of
/>
was\>
, reason why the W3C validator indicates that there were errors... then the question was edited and generated a huge confusion in the answers... Just see the issue history of the question that should break some highscores :D (but thanks for the Feedback).– Zuul