It’s not a quiz, if done right. But you can get to know a lot about someone even by how they respond to not knowing the answer.
Someone with experience knows it’s not a big deal to not know every bit of trivia, but they can talk intelligently about what the code might do. And they know how to find out.
For example, they may point out they know about charset=utf8 in the Content-Type header and admit they thought the meta tag was redundant, and you can have a conversation from there. Or how about "I know 'ltr' means left to right but I never thought about using it with lang=en, but now I want to see what 'rtl' does with English". I suppose it's not the best starter question, but I don't think it needs to be to suss out good candidates from bad ones.
Rage-quitting the interview or blurting out confidently wrong guesses, on the other hand, are bad signals.
I would think that if you would walk out of an interview if the interviewer asked you basic questions then those questions have done their job.