Children and the servants have their main meal – dinner – in the middle of the day. Everyone else has lunch – or if it's a posh meal or you're very old-fashioned, luncheon – in the middle of the day. Children have [nursery] tea in the afternoon or early evening and then go to bed. Adults may have tea – thinly sliced bread and butter, little sandwiches, cakes and tea to drink – in the mid-afternoon and dinner in the mid-evening. Should anyone have room for anything more after this, such as cocoa, then it's called supper and served approaching bedtime. Debutantes' dances and other such elevated society events served a fairly substantial supper around midnight, presumably because the bright young things had danced themselves into a state of ravenous hunger.
These days, no-one has much time for lunch, tending to grab a sandwich on the run. The main evening meal is usually shared with any children and called supper or tea, depending to a large extent on which part of the country you come from. When entertaining guests for a formal meal in the evening, it is usually called dinner and also dinner is served in a restaurant in the evening.
The whole what meal is called by what name is another one of those areas of social minefield that is rife with snobbery. Perhaps it would be better if we just had morning meal, middle of the day meal and evening meal or meal 1, meal 2 and meal 3. But then what about afternoon tea – meal 2a?
I don't suppose it matters what it's called as long as everyone is called in time to eat it.