Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML draggable attribute

HTML draggable attribute

HTML Global Attributes HTML Global Attributes

Example

A draggable paragraph:

This is a movable paragraph. Please drag this paragraph into the rectangle above.

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Internet Explorer 9+, Firefox, Opera, Chrome, and Safari browsers support the draggable attribute.

Note: Internet Explorer 8 and earlier IE versions do not support the draggable attribute.


Definition and Usage

The draggable attribute specifies whether an element is draggable.

Tip: Links and images are draggable by default.

Tip: The draggable attribute is often used in drag-and-drop operations. Please read our HTML5 drag-and-drop tutorialto learn more.


Differences between HTML 4.01 and HTML5

The draggable attribute is new in HTML5.


Syntax

<

element

draggable="true|false|auto">

HTML Global Attributes HTML Global Attributes