HTML draggable Attribute

Definition and Usage

draggable The attribute specifies whether an element is draggable.

Hint: Links and images are draggable by default.

Tip:draggable The attribute is commonly used in drag and drop operations. Learn more from our drag and drop tutorial.

See Also:

HTML Tutorial:HTML attributes

HTML Tutorial:HTML5 Drag and Drop

JavaScript Reference Manual:ondrag event

Example

A draggable paragraph:

<p draggable="true">This is a draggable paragraph.</p>

Try It Yourself

Syntax

<element draggable="true|false|auto">

Attribute Value

Value Description
true Specifies that the element is draggable.
false Specifies that the element is not draggable.
auto Use the default behavior of the browser.

Browser Support

The numbers in the table indicate the first browser version that fully supports this attribute.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
4.0 9.0 3.5 6.0 12.0