Problem Statement
Which event is triggered when a dragged item is dropped onto a valid drop target?
Explanation
The ondrop event fires when a dragged element is released over a valid drop target. To make an element droppable, you must prevent the default behavior in ondragover. The HTML5 Drag and Drop API makes it easy to create drag-based interfaces without third-party libraries.
Code Solution
SolutionRead Only
<!-- Simple Drag and Drop Example -->
<div id="drag" draggable="true" style="width:100px;height:50px;background:red;">Drag me</div>
<div id="drop" style="width:200px;height:100px;border:2px dashed black;margin-top:10px;">Drop here</div>
<script>
const drag = document.getElementById('drag');
const drop = document.getElementById('drop');
drop.ondragover = e => e.preventDefault();
drop.ondrop = () => drop.textContent = 'Dropped!';
</script>