Interview Question

What is the draggable attribute?

Draggable allows an element to start a drag action.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

The `draggable` attribute says whether an element may be dragged. β€’ It is written inside an element’s opening tag. β€’ The HTML Standard limits which elements may use it and which values are valid. β€’ Browsers apply the attribute when they process the element or the resource it controls.

💡 Simple Example

<img src="card.png" draggable="true" alt="Card">

⚡ Quick Revision

Draggable allows an element to start a drag action.