When describing movement towards a destination (Wohin?), these prepositions take the accusative. When describing a static location (Wo?), they take the dative.
KasusKnacker
app.kasusknacker.com
Sprach-Snacks
Fresh daily — bite-sized German gems
Wo = Dativ, Wohin = Akkusativ
The core rule for two-way prepositions.
When describing movement towards a destination (Wohin?), these prepositions take the accusative. When describing a static location (Wo?), they take the dative.