Section 1 - Instruction

You've learned to change element content with textContent and innerHTML, and to modify styles with the style property and classList. Now let's practice combining these skills.

Being able to change both content and appearance together creates powerful interactive experiences.

Engagement Message

Ready to make some dynamic changes to web pages?

Section 2 - Practice

Type

Fill In The Blanks

Markdown With Blanks

Let's practice the syntax for changing content and styles. Fill in the missing JavaScript code:

Suggested Answers

  • textContent
  • backgroundColor
  • add
Section 3 - Practice

Type

Multiple Choice

Practice Question

You want to create a success message that appears when a form is submitted. Which combination of changes would be most effective?

A. Only change the text content B. Only change the background color C. Change text content, color, and add a CSS class D. Only add a CSS class

Suggested Answers

  • A
  • B
  • C - Correct
  • D
Section 4 - Practice
Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal