HTML Drag and Drop API
Powers file upload drop zones, sortable lists, kanban boards, and drag-based UI. The DataTransfer API is shared with clipboard events. Understanding dragover prevention (preventDefault) and data transfer types is essential.
What It Defines
HTML living standard section defining the drag-and-drop model: DragEvent, DataTransfer object (setData/getData/files/items), drag operations (dragstart, drag, dragenter, dragover, dragleave, drop, dragend), dropEffect/effectAllowed, and drag image customization.
Canonical (Normative)
Convenient (Practical)
Maintains the living standards for the web platform: HTML, DOM, Fetch, URL, Streams, and more. These are continuously updated living documents, not versioned snapshots.
Related Specs
The spec behind every HTML page, form, and browser API. The canonical reference for how browsers actually parse and process HTML.
Used by every file upload, image preview, drag-and-drop, and client-side file processing feature. Blob URLs are the bridge between binary data and DOM elements (img, video, a[download]).
Required for any 'Copy to clipboard' button, paste-from-image, or rich text editing. The async API requires user gesture and permissions — understanding the security model prevents frustrating clipboard failures.