I wouldn't put a code snippet in front of the developer and ask him/her to "find the bug" or something like that, it doesn't really tell you much more about the skills of the person than whether he/she knows how to keep cool during an interview.
What I like to do is to have a telephone call with the candidate and inform them of an assessment test on Github, if they agree to that then it's usually very fruitful. I don't know of any HTML/CSS tests, but you could create a repository of your own with some tasks, something like:
The commits with solutions you get this way will tell you a lot about how they code and their ability to understand tasks etc. Not to mention, you will see how well they handle Git.
With Javascript it's much simpler, as there already are assessment repositories available that you can simply ask the candidate to complete. Here is my favorite:
https://github.com/rmurphey/js-assessment
Depending on the JS skills of the role you are hiring for, you may want to exclude some of these tests as they may be too hard for a junior developer.
On the phone call, ask them for a good time to work on these and mention that it should not take more than a couple of hours or so. Looking at their solutions you will have a good idea about their abilities and after that, having a face-to-face interview can be left with just getting to know each other and talk tech stuff.