At my company we don't work with tests and the portfolio is more important, especially because we tend to look at the candidate's personal motivation and passion for doing front-end development.
But if I should give the candidate a test before hiring, I would go about it this way:
Hand over a print-out of a photoshopped web page representing a clear semantic component tree underneath. Ask the person how he or she would come to a result in html. Just ask him or her to think out loud. What goes through one's head when seeing a page, knowing it needs to be developed.
Then it comes down to the approach the candidate takes.
Choosing the best available markup for each specific html section is one (important) aspect, but can be mastered with experienced people around to guide a new employee. Being able to properly break down a design into its semantic components, identifying sections and separating primary and secondary content from navigation is not math or science and therefore hard to test. But a conversation about the approach of breaking down a page might separate experienced people from beginners.
But as I said in my first line, we usually ask for what kind of web-related work a person has done in his or her free time, such as a blog, game or demo. If done anything, the person usually was really good at front-end development or was eager to learn and adapt.