Module 6: Document Object Model

In this module, we’ll cover:

Git & GitHub Basics

What is Git?

Git is a version control system that lets you track changes to files and collaborate with others.

What is GitHub?

GitHub is an online platform to store and collaborate on Git repositories.

Keywords:

Basic Commands


                git init                    # Start a new Git repository
                git add .                   # Add all files to staging
                git commit -m "Message"     # Save changes with a message
                git push                    # Upload to GitHub (after setup)
            

Workflow

  1. Create Repository on GitHub
  2. Clone to your computer
  3. Make changes → addcommitpush

Example Screenshot (Placeholder)

GitHub Example Screenshot

Demo

Lets make a repository to house all of the session code and make some branches and talk about each one of these definitions and processes

This is going to be a change that I will commit to show how PR's pushes and changes all relate

What is the DOM?

The Document Object Model (DOM) represents the HTML content of a page as a tree of objects that JavaScript can access and modify.

HTML → DOM → JavaScript

<h1>Hello</h1> → document.querySelector("h1")

Common DOM Methods

Example Code


                // HTML CODE
                <h1 id="title">Welcome</h1>

                // JAVASCRIPT CODE
                const title = document.getElementById("title");
                title.textContent = "Hello, DOM!";
                title.style.color = "blue";
            

DEMO

Howdy Partner!

Demo: Color Picker

We’re going to build a color picker that updates the entire background color of the page.

Let’s Build It Together!