It's been a long while since I coded html (I quit about the time style sheets appeared) but I think the annoying part of <code>&amp;nbsp;</code> is the fact that it appears as the 6 characters instead of a space, not just that it's at the end and could push the text to another line. Doesn't this typically mean that someone copied some code but didn't look carefully at the results when they pasted it into an editor? --[[User:DanB|DanB]] ([[User talk:DanB|talk]]) 14:27, 7 December 2012 (UTC)

It's been a long while since I coded html (I quit about the time style sheets appeared) but I think the annoying part of <code>&amp;nbsp;</code> is the fact that it appears as the 6 characters instead of a space, not just that it's at the end and could push the text to another line. Doesn't this typically mean that someone copied some code but didn't look carefully at the results when they pasted it into an editor? --[[User:DanB|DanB]] ([[User talk:DanB|talk]]) 14:27, 7 December 2012 (UTC)

+

:Either the title text has been parsed - in which case it's actually <code><nowiki>&amp;lt;A&amp;gt;: Like&amp;lt;/a&amp;gt; this&amp;amp;nbsp;</nowiki></code> (and, yes, probably copy/pasted) - or it hasn't (which seems more likely to me), in which case the &nbsp; will show up as a non-breaking space when it is parsed. [[User:Noëlle|Noëlle]] ([[User talk:Noëlle|talk]]) 00:40, 8 December 2012 (UTC)

:Either the title text has been parsed - in which case it's actually <code><nowiki>&amp;lt;A&amp;gt;: Like&amp;lt;/a&amp;gt; this&amp;amp;nbsp;</nowiki></code> (and, yes, probably copy/pasted) - or it hasn't (which seems more likely to me), in which case the &nbsp; will show up as a non-breaking space when it is parsed. [[User:Noëlle|Noëlle]] ([[User talk:Noëlle|talk]]) 00:40, 8 December 2012 (UTC)

+

+

::The title text is copy/pasted from xkcd, where he escapes the ampersand so that the non-breaking space escape will show up in the title text. He might just be toying with those of us who know about the non-breaking space, as most people (the kind of people that would mis-match div and span and change the case of their tags) don't even know what a non-breaking space would be used for.

I wonder if the "answer" in the title text is yet another joke? It goes <A>: Like</A> this&nbsp; — but A used in this way means Anchor, not Answer. Such a line would appear in the browser as "Like this" (with the word Like blue and underlined), making it a clickable "Like" link. {{unsigned|69.158.169.14}}

I wonder if the "answer" in the title text is yet another joke? It goes <A>: Like</A> this&nbsp; — but A used in this way means Anchor, not Answer. Such a line would appear in the browser as "Like this" (with the word Like blue and underlined), making it a clickable "Like" link. {{unsigned|69.158.169.14}}

Revision as of 03:37, 8 December 2012

I literally grimaced when I saw the comic, and then I read the title text and my stomach churned, and then I saw the non-breaking space and I wanted to crawl up in a ball and die. lcarsos_a (talk) 06:01, 7 December 2012 (UTC)

I'm a web developer and I didn't find this annoying, although I did roll my eyes. Then I came here to see if there was anything I missed that SHOULD annoy me. No, to annoy a web developer you have to use table tags, blink tags(not supported on most browsers for good reason, annoys anybody when it works), and have a stray !-- inside a tag where it doesn't belong. Also, use any html inside your css file. And have it where it only works in IE. Ferretwilliams (talk) 06:11, 7 December 2012 (UTC)

That's okay, it's easy to implement blink with javascript and changing the display value from hidden to inline every half second. And lots of news sites these days re-implement the marquee tag with a bit of javascript too. What Randall really missed here was an opportunity for the center and font tags. lcarsos_a (talk) 06:18, 7 December 2012 (UTC)

That's exactly what I meant... People do that to me in emails because they know it presses my buttons! DreamingDaemon (talk) 16:56, 7 December 2012 (UTC)

It's been a long while since I coded html (I quit about the time style sheets appeared) but I think the annoying part of &nbsp; is the fact that it appears as the 6 characters instead of a space, not just that it's at the end and could push the text to another line. Doesn't this typically mean that someone copied some code but didn't look carefully at the results when they pasted it into an editor? --DanB (talk) 14:27, 7 December 2012 (UTC)

Either the title text has been parsed - in which case it's actually &lt;A&gt;: Like&lt;/a&gt; this&amp;nbsp; (and, yes, probably copy/pasted) - or it hasn't (which seems more likely to me), in which case the will show up as a non-breaking space when it is parsed. Noëlle (talk) 00:40, 8 December 2012 (UTC)

The title text is copy/pasted from xkcd, where he escapes the ampersand so that the non-breaking space escape will show up in the title text. He might just be toying with those of us who know about the non-breaking space, as most people (the kind of people that would mis-match div and span and change the case of their tags) don't even know what a non-breaking space would be used for.

I wonder if the "answer" in the title text is yet another joke? It goes <A>: Like</A> this — but A used in this way means Anchor, not Answer. Such a line would appear in the browser as "Like this" (with the word Like blue and underlined), making it a clickable "Like" link. 69.158.169.14 (talk) (please sign your comments with ~~~~)

I think there is another joke hidden there: It goes »<A>: Like </A>this« instead of »: <A>Like</A> this« which turns not only »Like« but also the surrounding whitespace and punctuation into a link/anchor. That points to WYSIWYG HTML editors, as it's easy there to select a little bit more than the intended word when creating a link/marking text as bold, etc. 178.201.95.76 01:03, 8 December 2012 (UTC)

Similarly, it would be nice to address whether you can close a <div> with a </span>. Obviously you're not supposed to, but would it work? – PhilosopherLet us reason together. 20:57, 7 December 2012 (UTC)

Opening but not closing a div tag, depends on how a browser's quirks mode interprets that; I'd expect the browser to have everything fall into that div until it encounters a close tag of an element outside (that the div is nested inside). I'd also expect that encountering a close span without having first pushed an open span tag onto the DOM would simply not be recognized as markup and treated as improperly escaped page content. But, I don't write code for any of the major browsers so this is wild speculation. lcarsos_a (talk) 21:24, 7 December 2012 (UTC)

You can't close a DIV with a SPAN; they're syntactically different and browsers treat them as such. If you try the code above, the major browsers do exactly as Lcarsos suggests with the open DIV (continue until they find a matching /DIV or until /BODY) and completely ignore the /SPAN (Chrome goes so far as to expunge it from the DOM entirely). The DIV behavior exposes a subtler aspect to the comic, actually - because DIV isn't a semantic element, if a /DIV is missing, it can get very, very difficult to track down where the appropriate /DIV is supposed to go, especially when multiple coders are working on a single long (and, in the worst-case scenario, improperly-nested, multi-file) page. Noëlle (talk) 00:39, 8 December 2012 (UTC)

Search

Navigation

Tools

It seems you are using noscript, which is stopping our project wonderful ads from working. Explain xkcd uses ads to pay for bandwidth, and we manually approve all our advertisers, and our ads are restricted to unobtrusive images and slow animated GIFs. If you found this site helpful, please consider whitelisting us.