Drag to move images around on screen

I’m interested in making a game in which users can click and drag boxes or images around the screen, and I will be able to check their position or click them into place.

Do you have any code suggestions for a way to drag elements around on the page?