HTML Academy
  • HTML Academy
  • Courses
  • Tutorials
  • Courses
  • Tutorials
  • Sign up
  • Log in
  • Home
  • Interactive courses
  • Introduction to web development
  1. Introduction to HTML and CSS 0/12
  2. Introduction to JavaScript 0/16
  3. Introduction to PHP 0/15

Chapter 2: Introduction to JavaScript

16 tasks, 1 summary

We’ll learn a little about JavaScript, use it to change the page layout, write a theme switcher, create an interactive subscription form, and learn how to use the console.

Start
1. Why is JavaScript necessary? Task
2. Introduction to the theme switcher Task
3. Find an element using querySelector Task
4. Output the element to the console. Task
5. Let’s remove the class using classList.remove Task
6. Let’s add a class to the element using classList.add Task
7. Declare a variable Task
8. Introduction to the event handler Task
9. Let’s make it so that the theme is switched when the button is clicked Task
10. Introduction to classList.toggle Task
11. Let’s finish our theme switcher Task
12. Introduction to the textContent property Task
13. Change the textual content for the element Task
14. Uncomment the code Task
15. We retrieve data from the input field using input.value Task
16. Let’s use concatenation Task
17. Summary of “Introduction to JavaScript” Summary

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.