Can a D&D campaign be taken fully serious?

I'm thinking about starting a D&D campaign, but I haven't quite gotten around the tone of it, is it inevitable that in the end, it's all for laughter? I kinda wanna treat serious subjects such as grief, trauma, war and so on. Obviously there'd still be some homour, but I don't want this to be the focal point of the story. Could this be possible?