JS
…
Dashboard/JavaScript DOM/classes & text

Module 2 of 5

classes & text

Update classes, text, and attributes on elements.

JavaScript DOM · 0/7 completed · scroll down for every challenge

Challenge 1 of 7

Change text

Instructions

Set the text of `#status` to `"Ready"`.

Editor

IntelliSense on

// Write your code below

Challenge 2 of 7 · Toggle class

Challenge 2 of 7

Toggle class

Instructions

Add class `active` to `#card` using `classList.add`.

Editor

IntelliSense on

// Write your code below

Challenge 3 of 7 · Increment counter text

Challenge 3 of 7

Increment counter text

Instructions

Read `#count` text as a number, add 1, and write it back as a string.

Editor

IntelliSense on

// Write your code below

Challenge 4 of 7 · Remove a class

Challenge 4 of 7

Remove a class

Instructions

Remove class `warning` from `#banner`.

Editor

IntelliSense on

// Write your code below

Challenge 5 of 7 · Replace heading

Challenge 5 of 7

Replace heading

Instructions

Set `#title` text to `"Published"`.

Editor

IntelliSense on

// Write your code below

Challenge 6 of 7 · Set attribute

Challenge 6 of 7

Set attribute

Instructions

Set the `alt` of `#logo` to `"JS Practice"`.

Editor

IntelliSense on

// Write your code below

Challenge 7 of 7 · Update href

Challenge 7 of 7

Update href

Instructions

Change `#docs` href to `"/guide"`.

Editor

IntelliSense on

// Write your code below

Next module