X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML draggable Attribute


Example

A draggable paragraph:

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

Try it yourself »

Definition and Usage

The draggable attribute specifies whether an element is draggable or not.

Tip: Links and images are draggable by default.

Tip: The draggable attribute is often used in drag and drop operations. Read our HTML Drag and Drop tutorial to learn more.


Browser Support

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

Attribute
draggable 4.0 9.0 3.5 6.0  12.0


Differences Between HTML 4.01 and HTML5

The draggable attribute is new in HTML5.


Syntax

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

Attribute Values

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


Related Pages

HTML Tutorial: HTML Attributes

HTML Tutorial: HTML5 Drag and Drop



Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook