"If I could, I would surf the internet all day long."
Translation:Se mi povus, mi retumus la tutan tagon.
Usually "dum" means "while" in a strictly temporal sense, so referring to some sort of temporal relation or simultaneousness.
On the other hand "tra" usually means "trough" in a strictly "through some sort of material"-sense like through a wall or trough a cake.
So it seems to me, that "tra la tago" is more like some metaphorical usage. It is understandable but I would recommend "dum la tago" as long as you are not doing poetry or something.