Trouble with DOM Manipulation exercises from Web Development 101

The following is the code that I have come up with for the DOM Manipulation exercises in Odin Project’s Web Development 101. I do not understand the topic enough to see where it is that I’m messing things up but it only displays on the web page “THE TITLE OF YOUR HOMEPAGE.” I’d be much obliged to anyone that can tell me how to correct the code so as to have the other elements display.

// my javascript file

const container = document.querySelector(’#container’);

const content = document.createElement(“div”);

content.classList.add(“content”);

content.textContent = “This is the glorious text-content!”;

container.appendChild(content);

const cont1 = document.createElement(“p”);

cont1.classList.add(“cont1”);

cont1.textContent = “Hey I’m red”;

cont1.style.color = “red”;

container.appendChild(cont1);

const cont2 = document.createElement(“h3”);

cont2.classList.add(“cont2”);

cont2.textContent = “I’m a blue h3”;

cont2.style.color = “blue”;

container.appendChild(cont2);

const div1 = document.createElement(“div”);

div1.classList.add(“div1”);

div1.style.backgroundColor = “pink”;

div1.style.borderColor = “black”;

const cont3 = document.createElement(“h1”);

cont3.classList.add(“cont3”);

cont3.textContent = “I’m a div”;

div1.appendChild(cont3);

const cont4 = document.createElement(“p”);

cont4.classList.add(“cont4”);

cont4.textContent = “ME TOO!”;

div1.appendChild(cont4);

content.appendChild(div1)

Hello!
When I run your js file on my text editor it works fine on my end, is your js file properly linked to your HTML file?
here’s a screen grab of what I see
Screen Shot 2020-08-05 at 8.48.10 PM

Thank you! I finally got it to run properly. There was some sort of glitch that showed in the console but not in the visual studio code editor. Go figure!

Awesome! Glad it works :slight_smile: