Do we have to give an answer that adheres to all legacy browsers?
I don't think that "all" but try to do it (in my opinion). We don't know the situation of the OP , maybe he/she is dealing with a not common situation (I won't imagine all possible situations because there are a lot).
If you read this:
Well, I can't trust at all about w3schools but until today there are users that still using old browsers and, if we all are developers, some customers want things that work with old and modern things too.
I heard that some people say:
"Tell them that the project will work only for modern browsers"
"We are in the 2012, you don't need to care about it".
And someone said in the comments discussion:
"We need to make a stand, as developers we are only hindering our own trade by allowing our users and clients to run on out dated legacy software. Take some responsibility for your field and only support the current, and maybe previous (x2) versions of any major browser. We need to move the industry forward... not just raise the bar, but let people silently walk around it."
I agree with that, but that is in the "ideal world". Customers not always are like that, you can tell them and maybe the answer for telling that will work with modern browsers only will be positive and sometimes not. This doesn't mean that we must fit old browsers as a requirement but as I said, trying to reach browsers as we can will be good (maybe 2 prior versions or more, it depends).
By the other hand, there are few uncommon cases. An experience from myself was that one day I was working on a project for a bank and the sales area floor uses (until today) IE6.
I think that customers or stakeholders have to tell developers which browsers they want (to work according to that and don't suppose or just work with modern things).
So my answer is:
but try to unless you know the context situation or requirements.