Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | dropzone Attribute

  • Difficulty Level : Basic
  • Last Updated : 19 Jul, 2019

The dropzone attribute in HTML is used to specify whether the dragged data copied, moved, or linked when it is dropped on any element. This attribute is new in HTML5.

Syntax:

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

<element dropzone = "move | link | copy">

Attribute Value:

  • move: This attribute is used to drag the data and drop it into new location.
  • copy:This attribute is used to copy the drag data into new location.
  • link: This attribute is used to drop the data will result into original data.

Example:




<!DOCTYPE html> 
<html>
   <head>
      <title>ruby tag</title>
      <style
         body { 
             text-align:center; 
         
         h1 { 
             color:green; 
         
      </style>
   </head>
   <body>
      <h1>GeeksforGeeks</h1>
      <h2> dropzone attribute</h2>
      <div dropzone="copy">GFG</div>
      <div dropzone="move">GFG</div>
      <div dropzone="link">GFG</div>
   </body>
</html>

Output:
https://media.geeksforgeeks.org/wp-content/uploads/dropzone.png

Note: The dropzone attribute doesn’t support by the popular browsers.

My Personal Notes arrow_drop_up
Recommended Articles
Page :