Forma saysThe Drag and Drop API makes elements draggable and lets drop zones receive them via dataTransfer.
Set draggable="true" on an element, then handle the events: dragstart (stash data in e.dataTransfer), dragover (must call e.preventDefault() to allow a drop), and drop (read the data back).
The crucial gotcha: a drop zone won't accept anything unless its dragover handler calls preventDefault(). That single line is why most "drag and drop doesn't work" bugs happen.
Power-ups you unlock
draggable="true" makes an element draggable
dragstart stashes data in e.dataTransfer
dragover MUST preventDefault() to allow dropping
drop reads the data back out
Captain Invalid Input attacks — common mistakes
Forgetting preventDefault() in dragover → drop never fires
Storing complex objects in dataTransfer (it holds strings)
Not giving visual feedback on dragover (users feel lost)
Boss battleMake a chip draggable into a box. On drop, move the chip inside the box and highlight the box during dragover.