Now with HMTL5 we can use the DnD (i.e., Drag and Drop) API which is inbuilt in it and is supported by browsers like chrome, safari, Mozilla etc.
Now let's see step by step how drag and drop features work.
1. we have to give draggable attribute value true if we want to make an element draggable.
2. Now after making an element draggable we need to specify what needs to be done when an element is dragged. This is done using an event listener ondragstart.