Search Header Logo

DOM-Intro

Authored by Re:Coded Org

Computers

Professional Development

Used 9+ times

DOM-Intro
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What can you use to find HTML elements and connect them to js? (Select all that apply)

IDs

Tags

Class names

Any Attribute

Content

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What functions can we use to find HTML elements? (Select all that apply)

document.getElementById()

document.querySelector()

document.querySelectorAll()

document.findElements()

document.getElementSById()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

document.getElementsByTagName() returns ...

A single HTML element with the Tag name

All HTML elements with the Tag name

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the code in the image. To get the value of data-theme, what function are going to use?

Note: dataBox is the name of the variable that connects to this HTML element.

dataBox.getAttribute("data-theme")

dataBox.Attributes["data-theme"]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When we want to access all HTML elements with the class name "bg-red", what function do we use?

document.getElementsByClassName("bg-red")

document.getElementsByClassNameAll("bg-red")

document.getAllElementsByClassName("bg-red")

document.getElementsByClassName("bg-red").all()

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?