Basic Button Creation
Which HTML tag is primarily used to create a clickable button element?
- u003Clinku003E
- u003Cbuttonu003E
- u003Cdivu003E
- u003Cspanu003E
- u003Cinput type='text'u003E
Event Listener
What JavaScript event listener is most commonly used to detect a click on a button?
- onmouseover
- onload
- onclick
- onchange
- onfocus
Changing Text Content
Which JavaScript property is used to change the text content of an HTML element?
- innerHTML
- textContent
- innerText
- value
- alt
Correct Syntax
What is the correct JavaScript syntax for selecting a button element with the ID 'myButton'?
- getElementByID('myButton')
- document.getElement('myButton')
- document.getElementByID('myButton')
- document.getElementById(myButton)
- document.getElementById = 'myButton'
Button Text Update
Which of the following code snippets correctly updates the text of a button with ID 'myButton' to 'Clicked!'?
- document.getElementById('myButton').value = 'Clicked!';
- document.getElementById('myButton').textContent = 'Clicked!';
- myButton.innerHTML = 'Clicked!';
- document.getElementByID('myButton').text = 'Clicked!';
- document.getElementById('myButton').innerText = 'Clicked!';