[] are like Facebook
41–47 of 47 posts
Re: [] are like Facebook
#42This is way off topic, but I want to share since I just learned about this a day or two ago. Skip over this comment if you don't care about HTML5 trivia. I had no idea what this was supposed to be, and I thought maybe it just wasn't loading more content, so I checked the source. While there, Firefox told me there was an error with the HTML, and that the element contained elements that hadn't been properly closed. Thi…
[1]: http://dev.w3.org/html5/spec/single-page.html#start-tags [2]: http://www.w3.org/TR/xhtml1/#C_2
Re: [] are like Facebook
#43This is way off topic, but I want to share since I just learned about this a day or two ago. Skip over this comment if you don't care about HTML5 trivia. I had no idea what this was supposed to be, and I thought maybe it just wasn't loading more content, so I checked the source. While there, Firefox told me there was an error with the HTML, and that the element contained elements that hadn't been properly closed. Thi…
The HTML5 spec [1] covers this nicely: "[I]f the element is one of the void elements, or if the element is a foreign element, then there may be a single U+002F SOLIDUS character (/). This character has no effect on void elements, but on foreign elements it marks the start tag as self-closing." Furthermore, the space before the slash is only necessary for XHTML [2]. [1]: http://dev.w3.org/html5/spec/single-page.html#s…
The element is a "normal element", and the spec doesn't seem to indicate what to do with the slash/solidus on normal elements, only on void or foreign ones.
I got my information for my previous comment from an answer on StackOverflow[2], but the w3c's validator seems to back it up. The OP has been changed to use the explicit close tag on that element, so you'll have to edit the source to use the (non-)self-closing version to check it yourself, but it kicked up errors for me.
Specifically, the error given read "Self-closing syntax (/>) used on a non-void HTML element. Ignoring the slash and treating as a start tag." This is what I said in my previous comment, albeit much more succinctly.
As for your second comment, regarding the space before the slash, I don't understand its relevance to my comment. I said nothing about the space in the element; I only referred to the effect of the slash. Also, you're talking about XHTML, and linking to its spec, in a discussion regarding HTML5. If I'm missing your point, please clarify.
[1] http://dev.w3.org/html5/spec/single-page.html#elements-0
Re: [] are like Facebook
#44Earlier quoted context omitted.
The HTML5 spec [1] covers this nicely: "[I]f the element is one of the void elements, or if the element is a foreign element, then there may be a single U+002F SOLIDUS character (/). This character has no effect on void elements, but on foreign elements it marks the start tag as self-closing." Furthermore, the space before the slash is only necessary for XHTML [2]. [1]: http://dev.w3.org/html5/spec/single-page.html#s…
That's not what foreign elements are. If you click the link to "foreign elements" in your first link, you'll see that the spec[1] defines foreign elements as " Elements from the MathML namespace and the SVG namespace. " In other words, elements which are foreign to HTML. The element is a "normal element", and the spec doesn't seem to indicate what to do with the slash/solidus on normal elements, only on void or forei…
My comment about the spaces was trivia on top of your trivia. I thought it was relevant because all of your examples of self-closing tags had a space.
Re: [] are like Facebook
#45Earlier quoted context omitted.
That's not what foreign elements are. If you click the link to "foreign elements" in your first link, you'll see that the spec[1] defines foreign elements as " Elements from the MathML namespace and the SVG namespace. " In other words, elements which are foreign to HTML. The element is a "normal element", and the spec doesn't seem to indicate what to do with the slash/solidus on normal elements, only on void or forei…
I linked to the HTML spec because it explains that the slash only means something for void or foreign elements. The element is neither, so the slash is either interpreted as an attribute or ignored. You are correct, both in this comment and the previous one; I was agreeing with you and providing sources. My comment about the spaces was trivia on top of your trivia. I thought it was relevant because all of your exampl…