clase 8 #11

Open
alarcon.blas wants to merge 8 commits from alarcon.blas/clase-8-DOM:blas-alarcon into main
Showing only changes of commit 46d7563665 - Show all commits

View File

@@ -29,4 +29,35 @@ for (const p of parrafos) {
p.classList.add("destacado");
}
}
}
function agregarDiv() {
const nuevoDiv = document.createElement("div");
const nuevoh2 = document.createElement("h2");
nuevoh2.textContent = "Comidas tipicas de la region del litoral";
const pintroductorio = document.createElement("p");
pintroductorio.textContent = "Estas son algunas comidas tradicionales de la región del litoral argentino.";
const nuevoul = document.createElement("ul");
const comida1 = document.createElement("li");
comida1.textContent = "Chipa";
const comida2 = document.createElement("li");
comida2.textContent = "Pescado";
const comida3 = document.createElement("li");
comida3.textContent = "Sopa paraguaya";
nuevoul.appendChild(comida1);
nuevoul.appendChild(comida2);
nuevoul.appendChild(comida3);
nuevoDiv.appendChild(nuevoh2);
nuevoDiv.appendChild(pintroductorio);
nuevoDiv.appendChild(nuevoul);
document.body.appendChild(nuevoDiv);
}