88 comments

[ 2.5 ms ] story [ 93.7 ms ] thread
make it work first.
This should be renamed to 'How well do you know Browser Quirks?' as the test is more about that than HTML itself
Also ... .replace(/HTML/HTML,CSS,JS/)
If someone doesn't want to click: It's a css 3d animated quiz with scores and covers questions about whether any browser loads a ressource like css, png or js-file or iframe under certain corner case szenarios (like writing a comment using inline script and the browser having a prefetcher with preparsing)
This is a great way to present this information, thanks!
I was expecting some questions about obscure old school HTML tags and what they were meant for originally. Like others have suggested, maybe rename to cover web languages / browser quirks in general?
There are plenty of obscure modern HTML tags.

If anyway is bored I would love to see a graph of every possible HTML tag (old and new) plotted by frequency of actual use in the wild.

Some very rare - non outdated - ones:

  * colgroup
  * rowgroup
  * datalist
  * optgroup
  * fieldset
  * figure
  * figcaption
  * hgroup
  * keygen
  * legend
  * mark
  * ruby
  * details
  * summary
How many of these do you know? And how many have you ever used?
I use fieldset and legend frequently. I believe Bootstrap uses these in their example forms, so I don't think these are nearly as obscure as the others.

optgroup is occasionally useful for demarcating groups within lists, but this need hasn't come up much in my experience.

I also use figure and hgroup, although more just for the sake of using HTML5 elements than anything else!

hgroup has been dropped from the spec. You can/should stop using it :)
hgroup has been dropped from the spec.

figcaption is actually quite popular now. Most newly-developed "html5" websites use it.

fieldset has always been quite common in my experience.

I would kill for good ruby support in all browsers. As someone learning Japanese it would be a godsend when it comes to reading and learning kanji.

However we would also need to pretty specialised editors / automatic converters to write the ruby markup since it is so $&~!@#^ verbose.

I still find it ironic that the browser with the best (i.e. working) ruby support is Internet Explorer. (I am aware of some firefox plugins but...ech)

Hah, well, urm, this isn't quite finished yet, hence it being all broken in lots of browsers.

I guess I should have made this a private repo :D

Fix all of these bloody webkit-specific CSS properties, this thing is horribly broken in everything other than webkit. :P
It degrades gracefully in current FF, release channel.
I haven't finished building it yet (I didn't post it anywhere, the repo was discovered by others). You're welcome to preview it of course :)
It's also visually buggy in Safari.
It just flat out failed to work in Opera :(
Hehe, <insert easy joke about Opera here>. Hehe.
Actually, I think it's more a joke about knowing HTML...
I'm on the original iPad and it didn't work at all for me.
This was really nice, always great to get this kind of stuff in question/answer form. Making you think a little before getting the answer, as opposed to just in the form of some dense reading really makes this type of stuff stick in memory way easier.

Though you have to wonder, since the author clearly knows his browser quirks, as to why this only seems to work in webkit.

Well, wonder no more! The UI was thrown together for a Chromebook Pixel-based kiosk, so that's all I needed to support for the deadline I had.

Was planning on making it cross browser & responsive before making noise about it myself, which is why I've never mentioned it on Twitter etc.

This is fun and informative. Great job!

Many of these JS gotchas you usually don't find out unless you're either writing library code or you're really unlucky. For example, I'd say it's pretty weird for someone to create an script element and not attach it to the DOM at the same time.

Interesting and humbling test of various browser quirks when it comes to inserting assets (and sometimes not inserting them at all) into an HTML document. This is good information to know but a bit too edge casey for me to commit to memory relative to what I personally do on a daily basis at this point. A nice table of all these quirks would be really useful though!
It doesn't seem to scale well at large sizes. It's almost unusable in fullscreen Safari on 1920x1080.
No, it scales fine on chrome.
29/39 is damn good, it seems. What's yours!
26. Unfair! I never used web fonts at all :(

For the record, I hate web fonts because they always display incorrectly in anywhere between 1/4 and 3/4 major render engines. Usually all the ones except where you are testing in. I can't recall having seen websites with custom fonts that rendered correctly in Webkit, Presto, Gecko and Trident, so I shun webfonts altogether and just use the standard ones. Interesting fact that nobody seems to know: some people asked me what font I was using that displayed so well, while it was simply Arial with proper spacing. </rant>

I 've had 29/39 too. Mostly guessing ("he wouldn't ask if this was obvious, so..").
"You scored 22 out of 39

Sigh. Oh well. At least no one got hurt. That's the best we can take from that."

Really enjoyed it though! And worked fine on FF 21 (Win7 64bit).

I got 200 points! ;)

Just open the test, answer the first question and press and hold Enter key :)

Tested with latest Firefox.

Very cool. I'd actually be more interested to know which mobile browsers these answers apply to, considering pretty much the only time I care about how many requests I'm making (within reason, of course) is when my users are potentially paying per request. I believe some mobile plans charge per request with a minimum of 1KB per request or something like that.
Correct title: How well do you know edge cases with asset loading html, javascript, and css in the 4 major desktop browsers?
Really interesting - nice job @jaffathecake! Good luck in finishing it :)
This is a good collection of corner cases. I knew more of them than I didn't by a good margin, but there were plenty that made me scratch my head and no small number that I got wrong too.
Another important take-away from learning HTML is that, as glacially as it may seem to develop, it is indeed constantly under development, not just by the bodies agreeing on new features and standards, but also by the browser vendors who implement them gradually.

How many use rel="canonical", rel="next", hreflan="x-default", role="navigation", and dir="ltr", for instance? And how many knew that you can target languages in CSS?

It's very important never to be complacent about the HTML you know - or think you know.

Oftentimes, people just seem to think CSS and HTML are the support wheels you need to master before moving on to the things that actually matter farther back on the front-end.

Crashes safari on my iPhone 4
I'm not sure this is "How well do you know HTML" so much as "how well do you know browser quirks and edge cases involving CSS, DOM, and HTML."

I did horribly. I actually did better just guessing at random in some sections. On the other hand, I can't ever think of a time in 19 years of coding HTML where I ever structured anything like the code examples in the quiz.

Neither did I, though I still enjoyed it. Really opened my eyes to aspects of web development I never considered.
If it makes you feel better, I discovered loads I didn't know just writing the questions.
No, that's great too! I found the quiz informative. The title on HN was a little misleading, that's all.
I agree, but I think these exercises are still useful.

Reminds me of an interview I had well over a decade ago. It was a pretty high-flying investment bank, that was over 80% PhDs.

They were a C++ shop and asked me a particularly gnarly C++ question in the interview.

I didn't know the answer. In fact, I had no idea. I was pretty green & it was a pretty scary high-performing environment. So I answered how & why I'd avoid it entirely. Plus what I'd do if I actually encountered it in the wild.

The interviewer told me at the end - "Plenty of other interviewees have answered that question, but you're the only one who got it right."

That's just an anecdote really, but it's been borne out in my experience too. Knowing what you don't know is sometimes very useful...

> The interviewer told me at the end - "Plenty of other interviewees have answered that question, but you're the only one who got it right."

Thanks for sharing that story. It was very instructive.

Well it's kind of a joke at the expense of the people who push these things into existence on the web.

I managed OK till the js part, and got bored (I suck at js anyway)

I find that having to guess at questions I simply do not know the answer to can actually prevent me from retaining the right information. Because it forces me to rationalize and objectify my guess which will now have to compete with the real answer in my head once I want to retrieve it.

I ended up clicking "No" every time and just read the information. Lots of good morsels in there. Then I went back and took the quiz to test my retention.

Though I have felt the intuition you mentioned, here's a study that found that test-then-study-then-test leads to better recall than just-study-then-test: http://www.sciencemag.org/content/330/6002/335.abstract

    > To test this hypothesis, we presented 118 participants with 
    > 48 Swahili-English translation pairs for an initial study trial 
    > and then three blocks of practice trials.
I didn't get to study before my test, but the participants in the paper got to study before their first test.

To attempt to use the language of that study, when I take a test with no prior study, I suspect that I'm creating mediators based on my arbitrary guesses. I'm wiring up false assertions in my brain because I'm forced to rationalize and make a "best guess".

Once I get to study for the first time though, I trample over all those forced assertions.

Retrieving the correct information now becomes an exercise in being able to disentangle or even distinguish truth from my own rationalizations. To make matters worse, all of my initial rationalizations sound reasonable to me where the truth may be less reasonable (especially regarding browser quirks and other arbitrary bits of data).

That's a whole class of extraneous junk data that I suspect you can minimize by getting to study before your first test.

This freezes like crazy in iOS Safari.