How can you add an attribute to an HTML element using JavaScript?
A). element.setAttribute('attributeName', 'value');
B). element.attributeName = 'value';
C). element.attributeName('value');
D). element.attributeName.add('value');
How can you dynamically change the value of an input element using JavaScript?
A). element.value = 'New Value';
B). element.setAttribute('value', 'New Value');
C). element.setValue('New Value');
D). element.changeValue('New Value');
How can you set the border width of an HTML element using JavaScript?
A). element.style.borderWidth = 'width';
B). element.style.border.width = 'width';
C). element.border.width = 'width';
D). element.width = 'width';
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 change the href attribute of an anchor (link) element using JavaScript?
A). element.href = 'https://example.com';
B). element.setAttribute('href', 'https://example.com');
C). element.setHref('https://example.com');
D). element.changeHref('https://example.com');
How can you set the font size of an HTML element using JavaScript?
A). element.style.fontSize = 'size';
B). element.style.fontsize = 'size';
C). element.fontsize = 'size';
D). element.size = 'size';
How can you remove an attribute from an HTML element using JavaScript?
A). element.removeAttribute('attributeName');
B). element.attributeName = '';
C). element.removeAttribute('attributeName', 'value');
D). element.attributeName.remove();
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 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';
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;