ejercicios DOM #10
@@ -23,4 +23,27 @@ const parrafos = document.querySelectorAll("#parrafos p");
|
||||
for (const parrafo of parrafos){
|
||||
if (parrafo.textContent.includes ("importante"))
|
||||
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