From 46d7563665b75c88bb3004137809186e5ded2e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 18 May 2026 19:27:48 -0300 Subject: [PATCH] Cree una funcion que agrega un div, un h2, un parrafo introductorio y un ul con comidas del litoral --- ejercicios-clase-8.js | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) 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); +}