Advertisement
Home Open Editor ❯

HTML draggable Attribute

Example

<p draggable="true">Drag me!</p>
<p draggable="false">No you can't drag me!</p>

Meaning

The draggable attribute is used to set whether or not an element is draggable.

Possible values

Tip The draggable attributes requires JavaScript usage for real integration with elements.

Note: By default links and images are draggable.


Standard Syntax

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


Applies to:

The draggable attribute can be used on the following element:

Element Attribute
All HTML elements draggable

Advertisement

Attribute Values

Value Description
auto Specifies the uses of the default browser.
false Specifies the element is not draggable.
true Specifies the element is draggable.
Home Open Editor ❯
Advertisement