9 ms·
How well do you know HTML?
- abdel 13y agomake it work first.
- jayflux 13y agoThis should be renamed to 'How well do you know Browser Quirks?' as the test is more about that than HTML itself
- drinchev 13y agoAlso ... .replace(/HTML/HTML,CSS,JS/)
- atesti 13y agoIf 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)
- stesch 13y agoI'm bad.
- egonschiele 13y agoThis is a great way to present this information, thanks!
- clarkmoody 13y agoI 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?
- ars 13y agoThere 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?
- chrishepner 13y agoI 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!
- markdown 13y agohgroup has been dropped from the spec. You can/should stop using it :)
- markdown 13y agohgroup 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.
- rurounijones 13y agoI 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)
- jaffathecake 13y agoHah, 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
- microcolonel 13y agoFix all of these bloody webkit-specific CSS properties, this thing is horribly broken in everything other than webkit. :P
- pygy_ 13y agoIt degrades gracefully in current FF, release channel.
- jaffathecake 13y agoI 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 :)
- comex 13y agoIt's also visually buggy in Safari.
- laumars 13y agoIt just flat out failed to work in Opera :(
- hablahaha 13y agoHehe, <insert easy joke about Opera here>. Hehe.
- PavlovsCat 13y agoActually, I think it's more a joke about knowing HTML...
- MichaelApproved 13y agoI'm on the original iPad and it didn't work at all for me.
- alipang 13y agoThis 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.
- jaffathecake 13y agoWell, 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.
- juandopazo 13y agoThis 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.
- rubiquity 13y agoInteresting 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!
- ancarda 13y agoIt doesn't seem to scale well at large sizes. It's almost unusable in fullscreen Safari on 1920x1080.
- onli 13y agoNo, it scales fine on chrome.
- bjoe_lewis 13y ago29/39 is damn good, it seems. What's yours!
- lucb1e 13y ago26. 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>
- ajuc 13y agoI 've had 29/39 too. Mostly guessing ("he wouldn't ask if this was obvious, so..").
- corford 13y ago"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).
- babuskov 13y agoI got 200 points! ;) Just open the test, answer the first question and press and hold Enter key :) Tested with latest Firefox.
- jaffathecake 13y agoHah, yep. Confirmed in Chrome too.
- atesti 13y agoWhat I found most peculiar in the knowledge provided by this quiz was this answer about the old method of reloading a page in the onresize handler (Anyone remembering this from Netscape 4): https://github.com/jakearchibald/request-quest/blob/master/www/questions/resize-reload/2.md https://github.com/jakearchibald/request-quest/blob/master/w... Only look if you don't want to do the quiz!
- rubiquity 13y agoLesson I learned from this: I never want to create a web browser. Reminds me of Paul Irish's blog post[1] about how few things a web browser engine give you and how much these browser vendors have to implement themselves. 1 - http://www.paulirish.com/2013/webkit-for-developers/ http://www.paulirish.com/2013/webkit-for-developers/
- rmrfrmrf 13y agoVery 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.
- epochwolf 13y agoCorrect title: How well do you know edge cases with asset loading html, javascript, and css in the 4 major desktop browsers?
- danbruc 13y agoToo long.
- basicallydan 13y agoReally interesting - nice job @jaffathecake! Good luck in finishing it :)
- wwweston 13y agoThis 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.
- kmfrk 13y agoAnother 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.
- alanning 13y agoCrashes safari on my iPhone 4
- scelerat 13y agoI'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.
- Xavi 13y agoNeither did I, though I still enjoyed it. Really opened my eyes to aspects of web development I never considered.
- jaffathecake 13y agoIf it makes you feel better, I discovered loads I didn't know just writing the questions.
- scelerat 13y agoNo, that's great too! I found the quiz informative. The title on HN was a little misleading, that's all.
- jwilliams 13y agoI 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...
- booruguru 13y ago> 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.
- danneu 13y agoI 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.
- bcjordan 13y agoThough 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 http://www.sciencemag.org/content/330/6002/335.abstract
- danneu 13y ago> 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.
- jedanbik 13y agoThis freezes like crazy in iOS Safari.
- robertelder 13y agoThis page is just a black screen for me on Chrome, Linux.
- ronaldx 13y agoThis was super-interesting, thanks! It would be nice to see the same information in a reference format (rather than a animated quiz), is that possible?
- frozenport 13y agoThis page brings my i3 Gentoo x64 Chrome Version 28.0.1500.20 beta to a halt. For example the rotating effect on the first page is very shaky getting a maybe 4 fps.
- sillysaurus 13y agoIn case Jake is reading: that page is unfortunately unusable on an iPhone 4 in Chrome (latest). It freezes for 30+ seconds trying to load the background effect. It crashed once for me, too.
- spiralganglion 13y agoAlso crashes mobile safari on an iPhone 5.
- pkulak 13y agoWorks great on my Nexus 7!
- mackwic 13y agoAlso works on Firefox mobile nightly quiet smoothly (but with some zoom issues on round changing).
- jaffathecake 13y agoI am reading. It's a work in progress that "leaked", I should have made it private really until it was ready. Was originally built for a Chromebook Pixel kiosk at Google I/O, totally aware it burns most browsers/devices to the ground.
- ivionday 13y agoThanks Jake - I did terrible on the quiz, so I found this really educational. Wish I could forget the quirks and focus on the spec, though...
- jimmaswell 13y agoI kept seeing the = in lines such as <a href=...> as - as in <a href-...>, what's with that?
- skcin7 13y agoI know HTML pretty well. However, I don't know all the HTML5 JavaScript APIs so I'd wouldn't call myself an expert.
- suyash 13y agoNot too good..23/39..need to learn about peculiar properties and behaviors that I assumed were trivial things but seemingly not. Great puzzle...I really enjoyed it, keep making more.
- bierko 13y agoHow do the animations work?
- hcarvalhoalves 13y agoGood. I´ll point to that next time I need proof on how hard web development sucks.
- wizardhat 13y agoLol, clearly this guy doesn't know it too well. So many rendering issues. I'm not sure what to think. I mean, this guy clearly read the HTML spec where it pertains to page loads, but also clearly skipped the sections that pertain to basic layout.
- jaffathecake 13y agoYou missed the bit about it being unfinished. I guess the quiz hurt your feelings so you had to come here and get your own back?
- dsego 13y agothere really should be an "I don't know" answer. I hate being punished for a bad guess.
- hawkharris 13y agoI enjoyed the presentation and animation, in particular. It was more fun than any other online quiz I've taken.
- angrydev 13y agoVery nice presentation, examples, and explanations.
- fruchtose 13y agoI agree with the other posters, that this quiz tests edge cases more than anything. That said, I think it is pretty rude to tell me after showing my score that the quiz would, and I quote, "not buy [me] on DVD."
- jaffathecake 13y agoOne should take oneself less seriously.
- improv32 13y agoBlackscreen on Chrome, Ubuntu. Works fine on Firefox
- just2n 13y agoI really like the presentation of the problems. I hope this is developed much further. It could, however, benefit a lot by having separate quizzes at different levels, and moving the edge-cases and browser-specific questions into their own quizzes. I also question the value of questions that are intentionally meant to trick you. Some of these questions, by their nature of being browser-specific, are time sensitive since no versions are specified. And I'd have to double-check all of these answers because I found at least one which is wrong: window.onresize = function(){window.location.reload()} Definitely reloads the page in Chrome 27 (and the current Canary, 29).
- jaffathecake 13y agoI can't recreate this. See http://jsbin.com/agitez/1/quiet http://jsbin.com/agitez/1/quiet, open dev tools, preserve the log, click the link, following page does not reload.
- just2n 13y agoResize the window.
- MindTwister 13y agoThe question was whether or not it refreshed the browser without user interaction. Resizing is an interaction
- jaffathecake 13y agoYep, what MindTwister says https://github.com/jakearchibald/request-quest/blob/master/www/questions/resize-reload/spec.json#L3 https://github.com/jakearchibald/request-quest/blob/master/w...
- just2n 13y agoThe question makes no sense, in that case. The verbatim question is: > Does the above trigger a request for the current page (a reload without user interaction) in any of the following: The "without user interaction" as presented describes the request for the current page, implying a programmatic reload, not "will this code run without user interaction." Of course it won't, nor will this: function foo(){ console.log('harharhar, I won\'t ever be printed, obviously!'); } At which point the question is really a basic/pointless JS question and has nothing to do with the concept the question is trying to address. Further, the part that manually dispatches the event doesn't quite match the spec: > If the currently executing task is the dispatch of a resize event in response to the user resizing the browsing context Emphasis mine. It's reasonable for an implementation to interpret this as a manually fired event does not meet the criteria and reload the page, while the same code called while actually resizing the browsing context would not.
- DigitalSea 13y agoSeemed more browser-quirk specific than HTML specific if you ask me. Half of the examples in the test I've never used in my life and never will. Probably an extreme test-case, still was interesting and well put together nonetheless.
- user731 13y agoWhat's funny, is how horribly this site loads in Firefox 21.
- theycallmemorty 13y agoI loved the passive-agressive 'encouragement' at the end: Game Over You scored 19 out of 39 Here's a fun fact: If you just blindly clicked 'yes' for every answer, you'd have scored better. But don't beat yourself up about it. I mean, you might hit someone else by accident.
- bcjordan 13y agoThought the one I got was really funny so I peeked at the source. Maybe that second 32 <= score < 35 text is a work-in-progress? :) 20>score? Here's a fun fact: If you just blindly clicked 'yes' for every answer, you'd have scored better. But don't beat yourself up about it. I mean, you might hit someone else by accident. 23>score? Sigh. Oh well. At least no one got hurt. That's the best we can take from that. 25>score? That performance was like the film Taken 2. You went in guns blazing but the result was, well, ugh. Wouldn't buy you on DVD. 29>score? Not too bad. If you were my child you'd be my second favourite. Even if I only had one child. 32>score? Pretty damn good. There's a lot of gotchas in there that you managed to avoid. 35>score? Difficult to criticise that score without being childish, so: Hahaha points you're a massive nerd. 35>score? Wow, that was impressive! You hardly tripped up at all. Give yourself a gold star. // Else: You cheated. You cheated and I hate you.