forked from marquez.juan/clase-8-DOM
ejercicio 5
This commit is contained in:
@@ -24,3 +24,26 @@ for (const parrafo of parrafos){
|
|||||||
if (parrafo.textContent.includes ("importante"))
|
if (parrafo.textContent.includes ("importante"))
|
||||||
parrafo.classList.add("destacado")
|
parrafo.classList.add("destacado")
|
||||||
}
|
}
|
||||||
|
//ejercicio 5
|
||||||
|
function ejercicio5(){
|
||||||
|
const seccion = document.createElement("div")
|
||||||
|
const titulo = document.createElement("h2")
|
||||||
|
titulo.textContent = "comidas típicas de la región del litoral"
|
||||||
|
const parrafo = document.createElement("p")
|
||||||
|
parrafo.textContent = "La región del litoral argentino se caracteriza por una gastronomía muy influenciada por los ríos, la pesca y las tradiciones guaraníes."
|
||||||
|
const lista = document.createElement("ul");
|
||||||
|
const item = document.createElement("li");
|
||||||
|
item.textContent = "chipa";
|
||||||
|
const item2 = document.createElement("li");
|
||||||
|
item2.textContent = "pacu asado";
|
||||||
|
const item3 = document.createElement("li");
|
||||||
|
item3.textContent = "surubi a la parrilla";
|
||||||
|
lista.appendChild(item);
|
||||||
|
lista.appendChild(item2);
|
||||||
|
lista.appendChild(item3);
|
||||||
|
seccion.appendChild(titulo)
|
||||||
|
seccion.appendChild(parrafo)
|
||||||
|
seccion.appendChild(lista)
|
||||||
|
document.body.appendChild(seccion)
|
||||||
|
}
|
||||||
|
//ejercicio 6
|
||||||
|
|||||||
Reference in New Issue
Block a user