HTML draggable-eigenschap

Definitie en gebruik

draggable Eigenschappen bepalen of een element sleepbaar is.

Waarschuwing: Links en afbeeldingen zijn standaard sleepbaar.

Tip:draggable The attribute is commonly used in drag and drop operations. Learn more in 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 to fully support this attribute.

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