HTML Academy
  • HTML Academy
  • Courses
  • Tutorials
  • Courses
  • Tutorials
  • Sign up
  • Log in
  • Home
  • Interactive courses
  • JavaScript basics
  1. Conditions and creating elements 0/15
  2. Element collections and properties 0/16
  3. Scrolling and operators 0/14
  4. Dynamic element styles 0/16

Chapter 4: Dynamic element styles

15 tasks, 1 challenge, 1 summary

Let’s learn how to change element styles by using the style property and data from the input fields. Let’s program the font color and size on the page and add a complexity scale for the password and the ability to view the password.

Start
1. The style property Task
2. Setting the font color Task
3. Obtaining the value from the field with the slider Task
4. Setting the font size Task
5. Comparing onchange and oninput Task
6. Configuring the background color Task
7. The type property Task
8. Using the checkbox to show the password Task
9. The checked property Task
10. Changing the bar length Task
11. Tying the bar length to the password length Task
12. Saving the password length as a variable Task
13. Comparison operators Task
14. The else if statement Task
15. Finishing the signup page Task
16. Summary of “Dynamic element styles” Summary
17. Test: Pixel art Challenge

Cookies ∙ Privacy ∙ License Agreement ∙ About ∙ Contacts ∙ © HTML Academy OÜ, 2019−2025

VISAMastercard

Log in

or

Forgot your password?

Sign up

Sign up

or
Log in

Restore access

Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.

Forgot to connect your email to the profile? Email us and we’ll help.

We are using cookies to gather information which will help you use our website most effectively. You can read about this here or disable this feature if you want. By continuing to browse the site, you agree to our use of cookies.