How to use Draggable Attribute in HTML5

In this article I am going to explain about Draggable attribute in Html5.
  • 2107

Draggable Attribute in HTML5

The draggable attribute use for defined element is draggable or not draggable. Draggable attribute mainly use in drag and drop operation. Drag gable attribute is new in HTML5. There are three value for draggable attribute.

  • True (Element can be drag and drop)
  • False (Element can not be drag and drop)
  • auto (Its based on browser behavior)

Browser that support Draggable Attribute

Mozilla firefox, Google chrome and Safari browsers.

Syntax

<ElementName draggable="lrt|rlt|auto">

Example

<html>

<head>

    <h4>

        Draggable attribute</h4>

</head>

<body>

    <p draggable="true">

        This line is draggable</p>

</body>

</html>

Output

drag.jpg

Further Readings

You may also want to read these related articles: here
Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

 

 

© 2020 DotNetHeaven. All rights reserved.