JavaScript DOM How to Create Interactive Dynamic Web Pages


Updated on

Course overview

Course type
Paid course
All Levels
16 hours
84 lessons
Available on completion
Course author
Laurence Svekis
  • Better understand the core principles of JavaScript
  • Create Dynamic interaction on webpages
  • Update HTML elements
  • Manipulate Element Styling
  • Add event triggers.


Learn how to make webpages Dynamic and Interactive using JavaScript to influence and manipulate page elements

Learn how to make your HTML and CSS code interactive and dynamic!  JavaScript can interface with the Document Object Model and help make webpage elements come to life!   Interact with web users via event listeners make your web pages respond to users and code.

Enroll now to get instant access to:

  • 10+ hours of lessons

  • 60 page downloadable workbook for Section 1 includes source code, tips, resources and challenges

  • 27 page downloadable workbook for Section 2 includes source code, tips, resources and challenges

  • 65 page downloadable workbook  for Section 3 includes source code, tips, resources and challenges

  • Premium instructor support to help you learn

  • Lifetime access to course updates

10 NEW coding Projects added - 5.5hrs NEW video content

  • Background Color Table Fun Create Table with JavaScript

  • Element Selector and Swap of Elements within the DOM JavaScript Code

  • JavaScript Dynamic Modal from Data Object Create Modals with Code

  • Page Clickers Create Dynamic Interactive Click Counters

  • Random Words Maker with JavaScript String Methods

  • Scrollbar scroll tracker Calculate the Scroll position on the page

  • Math Quiz and Start and Stop Counters with JavaScript

  • Dynamic Interactive JavaScript DOM memory Game

  • Dynamic JavaScript Coin Flipping game DOM game.

  • JavaScript Battle Cards Game using Array methods

  • JavaScript holds the key to selecting and changing web page elements.   The Document Object Model is a model of your HTML document represent within JavaScript as objects.  Your browser builds the DOM and JavaScript can be used to connect to it selecting and accessing data contained within the DOM.  All the web page elements are represented within the DOM.  Elements are within the HTML page rendered out by the browser.  JavaScript engine in the browser then create representations of the elements as JavaScript Objects

    See how easy it is to select elements and make the interactive.

    Explore JavaScript and how you can start coding JavaScript that will be able to interact with the Web page elements.

    Section 1 Basic of Coding JavaScript

    Covers all the fundamentals to code JavaScript - with examples and coding challenges in each lesson.

    Explore how to get started with code, setup you developer environment.  Create HTML files and connect your Javascript to the page elements.

    JavaScript coding best practices with tips and resources.   How to setup and use variables within your code.  Different data types and how JavaScript manages the values.  What functions are and how to use them in your code.  DOM and how JavaScript code can use the DOM to connect, update and manipulate web page elements.   

    Lessons in the section include :

    • Introduction to how JavaScript works and how you can write JavaScript code

    • Getting started writing code how to code with Javascript

    • JavaScript Code Tips

    • How to use variables in JavaScript

    • JavaScript Dynamic Type Conversion

    • Variable naming Rules

    • Arrays and Objects in JavaScript

    • JavaScript Functions

    • JavaScript Document Object Model

    • DOM methods with JavaScript

    • Logic Conditions with JavaScript

    • Operators in JavaScript

    • Ternary Operator JavaScript

    • Math Random Values

    • JavaScript For and While Loops

    • JavaScript Objects

    • Object Construction with JavaScript

    • Common JavaScript Array Methods

    • Looping through Array contents

    • Array Methods for Items

    • Array Methods for Sort

    • JavaScript Array Method Examples

    • JavaScript String Methods

    • Word Scramble Game

    • JavaScript JSON parse and JSON.Stringify()

    JavaScript is everywhere - all your favorite websites and also the ones you don’t like use JavaScript. Makes your web content come to life - JavaScript allows for interaction with content and makes things happen. JavaScript is the dynamic programming language that, when applied to an HTML document, can provide dynamic interactivity on websites. Used in all browsers it's the most popular coding language ever. Websites and web apps everywhere are using JavaScript. It runs directly in your browser and you can create html files with a text editor directly on your computer to run in your browser. Select the html file and open it with any browser.

    Code is a set of instructions for what you want to happen. Example : When a new person comes to your website, ask their name. Showing a welcome message with their name would be an example of something you might ask JavaScript to do. The instructions for the code would be to provide the user an input area, get the input value of their name, then use that value to return a response. Select a page element and update the contents of the element with the welcome message including the value of the input for the user's name.

    Getting started with JavaScript is easy: all you need is a modern Web browser. Create an index html file and open it in a browser Add JavaScript to the html either linking to a script file or JavaScript directly between the script tags in the HTML.

    From an instructor with over 18 years of real world web development experience, here to help you learn how to use the DOM for your web projects.  Ready to answer any questions you may have!

    The DOM is like a doorway to access all of this functionality that is already there.  JavaScript gives you the ability to open up that door and make amazing things happen on your website.  This course covers only the JavaScript Document Object Model and prior JavaScript knowledge is a prerequisite to this course.

    This course has everything you need to start creating your own interactive JavaScript code.  This is a step by step guide explaining how and why JavaScript DOM is used.  

    Lesson JavaScript Coding Exercise :

  • Create an HTML file and a JS file.

  • Use the script tags to link to the JS file as the source file.

  • Using the document.write() add text to the webpage.

  • Using the document.write() add html formatted content to your webpage.

  • JavaScript Code Tips

    • Use Comments when possible single or multiple line

    • Indent using whitespace to make the code readable

    • Create code in a separate JS file and link to it from the HTML file

    • Use the console for debugging and to see values

    How to use variables in JavaScript

    • Variables are one of the basic concepts of coding

    • Using const or let avoid using var

    • const and let are scope based

    • Parent scope vs local scope

    • Assign values to variables and reassign new updated values

    • Use of strings and numbers as values for variables

    • Dynamic type with JavaScript changing data type

    • Math and output from JavaScript directly

    JavaScript Objects how to use Objects in code

    One of JavaScript's data types is an object. These can be used to store various keyed collections and even more complex entities. The document is a giant object that contains a lot of entities. Learning more about objects will help better define what can be done with the DOM entities, how they behave and why as well as how they can be used.

    JavaScript Document Object Model for interactive web pages

    The Document Object Model (DOM) is an object that contains a data representation of the page elements. The DOM is structured in a tree like format, as objects that comprise the web page and content of the HTML web document. Document Object Model (DOM) is a programming interface for HTML documents, that is the logical structure of a page and how the page content can be accessed and manipulated. Bring your web pages to life with JavaScript and connect to the web page elements. Accessing the DOM you can create fully interactive content that responds to the user. DOM and JavaScript lets you create Dynamic web page content that can change without page refresh and present new elements and updated content to the user. Improve your web users experience with JavaScript and the DOM. What is the DOM Document Object Model How to select elements from your webpage with JavaScript Manipulate and change your page elements with JavaScript How to set styling attributes for elements Make them interactive with Event listeners DOM events and Page events with JavaScript How to create elements with code and add them to your webpage Moving elements and animation of elements.

    DOM methods with JavaScript select HTML page elements

    There are methods in the Document object that allow us to better select elements we want to manipulate with code. querySelector() and querySelectorAll() allow JavaScript to select page elements from the content within the document object.

    JavaScript querySelectorAll Get Page Elements Select ALL. Use of querySelector and querySelectorAll to select matching page elements. Different selectors including tag, id, and class. Select page element, iterate contents of node list output and update page elements.

    Logic Conditions with JavaScript if Statement Switch

    Conditions can be used within code to apply logic, and run different actions based on the result of the condition. Depending on the value either True or False the code can run different blocks of code.

    The if statement will check a condition, if true it runs the specified code. If false it does not run the code. Else provides an alternative if the condition is not true then else statement allows us to run a block of code on false if none of the previous conditions are true. You can also use the else if statement to check another condition with a separate block of code to be run if the previous condition came back as false.

    Using the switch statement allows us to specify several alternatives checking to see if any of the conditions match and allow the corresponding code to be executed.

    Math Random Values JavaScript get Random Numbers

    JavaScript Math object contains various methods that can be used for math functionality, in addition it also contains the random method that creates random values in JavaScript. The Math.random() method returns a floating-point number in the range 0 (inclusive of 0) to less than 1 (not including 1). The random value can then be multiplied and rounded to the nearest whole number to include the randomized range of values desired by the developer.

    Random values are ideal for games and to create unique custom experiences for web users.

    JavaScript For, While Do While Loops Run blocks of code

    Loops allow us to execute blocks of code a number of times, they also allow us to iterate through a list of items such as items in an array or other iterable list.

    Loops will always require several parameters, such as a starting value, a condition to stop the loop and a way to move through the items to the next item in the loop. We can set up a simple for loop by setting a variable to use with a starting value, then applying a condition to continue the loop if the condition is true, and incrementing the value of the variable so that eventually the condition is no longer true.

    JavaScript Objects how to use Objects in code

    One of JavaScript's data types is an object. These can be used to store various keyed collections and even more complex entities. The document is a giant object that contains a lot of entities. Learning more about objects will help better define what can be done with the DOM entities, how they behave and why as well as how they can be used.

    Arrays are also objects as a data type but they contain specific properties that allow the developer to interact with the contents of the array and its data.

    arr.push(val); // add to array return the array length

    arr.pop(); //remove last

    arr.shift(); //remove first item

    arr.unshift(val); //add to the front of array array length returned

    arr.splice(1); // return array with all items after the index of 1

    splice(start, deleteCount, val); //changes the contents of an array

    slice(start, end); // returns a copy of a portion of an array into a new array

    arr.slice(); //duplicate array as new array

    arr.slice(5); // return array items from index 5

    arr.slice(1,4); // return portion of array using slice

    arr.toString(); // returns a string representation of the array items

    arr.join(' - '); // returns a string representation of the array items using the argument value as a separator for the items in the array.

    Introduction to how JavaScript works and how you can write JavaScript code

    • JavaScript is a core technology on the web alongside HTML CSS

    • JavaScript runs in the browser and gets rendered by the browser within the HTML page.

    • You can connect to HTML elements, using the HTML DOM which is a programming interface for JavaScript to add, update and remove HTML elements.

    • HTML elements can be accessed as objects that have properties, methods, and events.

    • Code is a set of instructions that tells the application in a language that can be understood by it, what to do.

    • JavaScript code is single threaded, which means that only one thing can happen at a time on the thread. Other requests get blocked until an operation completes and then those requests will run.

    • How to write code using a code editor or IDE.

    • How the elements from the HTML code are represented within the DOM tree structure, and that you can navigate from one to another.

    • What Devtools are and how you can use them

    • How you can use console log and console dir methods within the DevTools to view the document object and see the contents of the page elements in the DOM.

    • How to add JavaScript code within your HTML file and run the JavaScript code in your browser.

    • JavaScript commenting in the code and how to make your code more readable.

    HTML is the markup language used to structure and provide meaning to the web content. CSS is the language used that contains the rules for styling the HTML content. JavaScript is the scripting language that allows you to create interactive and dynamic content within the web page.

    You can do a lot with JavaScript such as store values, run blocks of code, apply logic with conditions and add events to your page elements. There is a lot you can do with JavaScript and the possibilities are endless.

    APIs- are sets of prebuilt building blocks that allow developers to connect into and access these objects. Think of it like a control panel which JavaScript language lets you interact with.

    Browser APIs allow access to the web page elements, and other data. You can access the API and do useful programming things. The DOM ( Document Object Model) API allows you to manipulate the HTML and CSS of the page.

    • Learn how to select HTML elements via tags, id, class and queryselection

    • traverse elements move between elements to properly select the ones you are looking for

    • Find out about nodes and how they work

    • Get data from the DOM about your page and elements

    • Update your element CSS via JavaScript

    • Add interactive listeners for page events

    • Explore how JavaScript objects work

    • Append and remove elements Dynamically

    • Useful code snippets

    • Source Code is included

    • Top resources and more

    • Everything is included for you to get started quickly

    JavaScript is powerful, and the DOM really demonstrates this!

    This course is designed to cover core aspects of JavaScript and cover the Document Object Model (DOM).

    This course will demonstrate how to use the DOM and will help you develop skills how to manipulate the DOM within you website.   JavaScript is one of the most in demand skills, and learning how to use JavaScript will help to separate you from the crowd.   Want to know more, what are you waiting for take the first step.  Join now to start learning how you too can create DYNAMIC and INTERACTIVE pages within your website today.

    Please note that previous JavaScript and HTML experience is a requirement as the content of the course is to introduce the Document object model and how to connect JavaScript to the browser DOM.  This course only covers JavaScript as it relates to the DOM and the scope is to cover Document Object related content

    Similar courses

    JavaScript: Understanding the Weird Parts
    • 12 hours
    • 88 lessons
    • Certificate
    Modern JavaScript From The Beginning
    • 22 hours
    • 122 lessons
    • Certificate
    JavaScript DOM How to Create Interactive Dynamic Web Pages
    • English language

    • Recommended provider

    • Certificate available