Verified Accurate Answers 2025/2026
Drag and Drop API - correct answer A typical drag operation begins when
a user selects a draggable element, drags the element to a droppable
element, and then releases the dragged element.
It must have the attribute draggable set to true in the HTML
Drag/drop HTML code - correct answer <img draggable="true">
Needs true or false <img draggable> does not work
remember this
get an element that has been marked as draggable - correct answer const
draggableElement = document.getElementById('draggable-element');
add dragstart listener to the element - correct answer
draggableElement.addEventListener('dragstart', onElementDragStart);
add drag data to the event - correct answer function
onElementDragStart(event) {
event.dataTransfer.setData('text/plain', 'draggable-element');
}
History API - correct answer Controls the URL and lets navigational
changes appear without reloading the page and bookmark the specific
state without a individual url
aka use the browser back/forward buttons as navigation elements
history.pushState({page: 1}, 'Page One', '?page=1')
, File System API - correct answer access to the local users file system
even without uploading it. It can only read it, not update it.
input field email - correct answer looks like a text field but has validation
properties
input field image - correct answer click on the picture to submit the form
input field search - correct answer like text but line breaks are removed
wen submitted
input field url - correct answer looks like text but has some validation
client side form validation vs server side - correct answer its a good
practice to implement both. On the client side it helps to make the form
more user friendly and faster, since a typo can be detected prior the form
submission
built in form validation pros/cons - correct answer uses html form
validation. best performance but less configuration
remember this
javaScript form validation pros/cons - correct answer slower than built in
but more customizable
remember this
Form Validation