HTML, Javascript and CSS Week 7 Homework
Quiz
•
Computers
•
8th Grade
•
Practice Problem
•
Easy
Bayden Schellein
Used 3+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does .textContent do in JavaScript?
Sets or gets the HTML inside an element
Sets or gets the text inside an element
Changes the background color of an element
Creates a new HTML element
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the .onclick property in JavaScript?
Adds a new element to the page
Changes an element’s text automatically
Attaches a function to execute when the element is clicked
Removes an element from the page
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does text.value do in JavaScript?
A) Retrieves or sets the text content of an HTML element.
B) Retrieves or sets the value of an <input> or <textarea> element.
C) Changes the inner HTML of an element.
D) Adds a new value to an array.
Answer explanation
.value is used to get or update the value of form elements like <input> and <textarea>.
It does not change the text inside regular HTML elements like <p> or <div>—for that, .textContent or .innerHTML is used.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the <span> element commonly used for in HTML and JavaScript?
To create a new paragraph block
To apply styles or JavaScript actions to a specific portion of text within a larger element
To insert an interactive button
To define a section of a webpage
Answer explanation
<span> is an inline element used to group text for styling or scripting.
It does not create a new block-level section like <div>, but instead allows targeted modifications using CSS or JavaScript (e.g., changing colors, hiding content, or updating text dynamically).
Common JavaScript events like onclick or .textContent are often used with <span> elements.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main difference between oninput and onchange events in JavaScript?
oninput triggers only when the user clicks an input field, while onchange triggers when the input is submitted.
oninput fires every time the user types or modifies the input, while onchange fires only when the user moves away from the field after making a change.
oninput works only with text inputs, while onchange works with all input types.
Both events are identical and can be used interchangeably.
Answer explanation
oninput fires immediately whenever a change occurs (e.g., every keystroke in a text field).
onchange fires only when the user leaves the field after modifying the value (e.g., clicking outside a dropdown after selecting a new option).
onchange is commonly used for <select>, checkboxes, and radio buttons, while oninput is useful for real-time validation.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does the script determine if the correct answer was selected in this example
It checks if the button was clicked before displaying a message.
It verifies if the radio button with the id="correct" is checked when the button is clicked.
It automatically updates the result when the user selects an answer.
It assigns a value to all radio buttons and compares them before displaying a message.
Answer explanation
The script sets result.textContent = 'Nope!'; by default.
It then checks if the #correct radio button (the "True" option) is selected using if (correct.checked).
If checked, it updates result.textContent = 'You got it!';.
7.
MATCH QUESTION
1 min • 1 pt
Match the type of selectable objects
radio
range
value
textarea
checkbox
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
[RB3-Ch7] Data Verification & Validation
Quiz
•
6th - 8th Grade
10 questions
R082 Book Cover Assets planning
Quiz
•
7th - 12th Grade
10 questions
AI QUIZ
Quiz
•
6th - 8th Grade
20 questions
ÔN TẬP WHILE DO VÀ FOR TO DO
Quiz
•
8th Grade
10 questions
Bitmap v Vector Images
Quiz
•
KG - University
14 questions
Taylor Chess Quiz
Quiz
•
4th - 12th Grade
13 questions
Legislation - Symbols and meanings
Quiz
•
6th - 8th Grade
20 questions
[RB3-Ch3] Working with Spreadsheet
Quiz
•
6th - 8th Grade
Popular Resources on Wayground
10 questions
Forest Self-Management
Lesson
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
30 questions
Thanksgiving Trivia
Quiz
•
6th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
48 questions
The Eagle Way
Quiz
•
6th Grade
10 questions
Identifying equations
Quiz
•
KG - University
10 questions
Thanksgiving
Lesson
•
5th - 7th Grade
Discover more resources for Computers
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University
18 questions
Thanksgiving Trivia
Quiz
•
4th - 12th Grade
20 questions
Thanksgiving Trivia!
Quiz
•
6th - 8th Grade
20 questions
Thanksgiving
Quiz
•
KG - 12th Grade
12 questions
Thanksgiving Trivia
Quiz
•
3rd - 8th Grade
20 questions
Pythagorean Theorem and Their Converse
Quiz
•
8th - 9th Grade
10 questions
Origins of Thanksgiving
Lesson
•
6th - 8th Grade
