is used to
pull i.e. drag a portion of text in a web page.
It is also used to restrict the viewers from copying the contents of a site.
Values added with this attribute are:
|true||Text can be dragged.|
|false||Text cannot be dragged.|
|inherit||The text can be dragged if the main element can be dragged.|
Example Code 1:
Example Code 2:
Example Code 3:
Try to drag this text.
Example Code 1 (Explanation):
- You can drag the text.
Example Code 2 (Explanation):
- You will be restricted from dragging the text.
Example Code 3 (Explanation):
- Text can be dragged if the main input is mentioned with value "True".
It is supported by most of the elements in HTML5 & it is not available in the previous versions of the HTML.
It is applicable only in Firefox, Chrome and Safari
In Firefox, use this attribute with "ondragstart" mouse event in order to enable dragging option.