How can you set the border color of an HTML element using JavaScript?
A). element.style.borderColor = 'color';
B). element.style.border.color = 'color';
C). element.border.color = 'color';
D). element.color = 'color';
How can you hide an HTML element using JavaScript?
A). element.style.display = 'none';
B). element.style.visibility = 'hidden';
C). element.visible = false;
D). element.style.opacity = 0;
How can you enable a disabled HTML button using JavaScript?
A). element.disabled = false;
B). element.removeAttribute('disabled');
C). element.enable();
D). element.enable = true;
How can you add a CSS class to an HTML element using JavaScript?
A). element.classList.add('className');
B). element.className = 'className';
C). element.setAttribute('class', 'className');
D). element.addClass('className');
How can you remove a CSS class from an HTML element using JavaScript?
A). element.classList.remove('className');
B). element.className = '';
C). element.setAttribute('class', '');
D). element.removeClass('className');
How can you dynamically change the source (URL) of an image element using JavaScript?
A). element.src = 'newimage.jpg';
B). element.setSource('newimage.jpg');
C). element.setAttribute('src', 'newimage.jpg');
D). element.changeSource('newimage.jpg');
How can you set the background color of an HTML element using JavaScript?
A). element.style.backgroundColor = 'color';
B). element.style.background = 'color';
C). element.background = 'color';
D). element.style.color = 'color';
Which JavaScript method allows you to change the value of an HTML attribute?
A). setAttribute()
B). getAttribute()
C). removeAttribute()
D). createElement()
How can you disable an HTML button using JavaScript?
A). element.disabled = true;
B). element.setAttribute('disabled', 'disabled');
C). element.disable();
D). element.disable = true;
How can you change the text content of an HTML element using JavaScript?
A). element.textContent = 'New Content';
B). element.innerText = 'New Content';
C). element.innerHTML = 'New Content';
D). element.value = 'New Content';