I refer to Reason why I can't insert a comment inside the HTML tag?.
This question asks why comments can be placed in HTML tags. The OP gave the example of trying to place <!-- -->
comments inside an image tag, which everyone responded was impossible, of course. I suggested that if he was using a templating language, in most cases he could use template comments inside a tag, such as <img {{! comment }} src="foo.jpg">
.
One highrep gentleman took me to task for going off topic, saying that the question was obviously meant to be about HTML comments inside tags, and there was no mention of templating languages in the question, and my answer was not an answer, and was polluting the SO Q&A repository with off-topic answers.
My assumption was that the OP was at heart saying he wanted to somehow put comments inside HTML tags, tried using HTML comments, found they didn't work, and wanted to know why, but the underlying problem was if there was some way to place comments there, and my answer was a reasonable (the OP even commented "interesting") solution.
Another example: if a question asks for a regexp, and is tagged regexp, but there's a better non-regexp solution, is it off-topic to suggest that?
In another case, a question asked about some JS computation. I suggested an Underscore solution. Another member commented that since the original question was not tagged Underscore, that my answer was out of line ("not an answer"). I certainly understand people having trouble with jQuery solutions being proposed in non-jQuery contexts, but I think Underscore falls into a different category. It's a lightweight, robust, widely-used toolbelt that the OP might not know about.
So my question is, how rigorously are we to read questions and their tags; are they to be taken literally, or how much room is there for an interpretation?