
JavaScript for Beginners #2 - Modifying HTML Elements
Quiz
•
Computers
•
11th Grade
•
Practice Problem
•
Medium
Joseph Armanious
Used 3+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between 'document' and 'console' in JavaScript?
'document' refers to the HTML document itself, while 'console' refers to the console window.
'document' and 'console' are both methods to display outputs.
'document' is used to write logs, while 'console' is used to manipulate HTML elements.
There is no difference; both are used interchangeably.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method is used to access an HTML element by its ID?
getElement()
getElementById()
findElementById()
querySelector()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What property is used to change or get the content of an HTML element?
textContent
innerHTML
value
innerText
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you correctly reference an ID in the getElementById() method?
Using the ID name within quotation marks.
Preceding the ID name with a hash (#).
Preceding the ID name with a dot (.)
Using the ID name without quotation marks.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to change the text of an HTML element?
document.getElementById('id').textContent = 'New Text';
document.getElement('id').innerHTML = 'New Text';
document.querySelector('#id').value = 'New Text';
document.getElementById('id').innerText = 'New Text';
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does 'document.write' do?
Writes content directly to the console.
Creates a new HTML document.
Updates the value of a specified element's ID.
Writes content directly to the HTML document.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you comment out a line of code in JavaScript?
Using // at the beginning of the line
Using ** at the beginning of the line
Using /* and */
Using
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Quiz 1
Quiz
•
1st - 12th Grade
15 questions
Identify the Line with Syntax Error
Quiz
•
10th - 11th Grade
10 questions
PUNCTUATION SPACING RULES
Quiz
•
9th - 12th Grade
10 questions
A level Computer Science In-fix post-fix Reverse polish
Quiz
•
10th Grade - University
10 questions
Aplikasi Perkantoran
Quiz
•
11th Grade
13 questions
Guess the Retro Computer 1
Quiz
•
KG - Professional Dev...
11 questions
Threats to Data
Quiz
•
9th - 12th Grade
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
