diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 9246c69..c153563 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -29,4 +29,35 @@ for (const p of parrafos) { p.classList.add("destacado"); } -} \ No newline at end of file +} + +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); +}