Clase-8-DOM #7

Open
dipaolo.lucio wants to merge 4 commits from dipaolo.lucio/clase-8-DOM:navegador-y-dom into main
2 changed files with 21 additions and 1 deletions
Showing only changes of commit e59c8a8a16 - Show all commits

View File

@@ -2,4 +2,21 @@
//1
const tituloh1 = document.querySelector("h1")
console.log(tituloh1.textContent);
tituloh1.textContent = "Titulo reemplazado correctamente"
tituloh1.textContent = "Titulo reemplazado correctamente"
//2
function List(){
const items = document.querySelectorAll("ul li")
for (const item of items){
item.classList.add("item-lista")
}
}
//3
function agregarItem(texto){
const nuevoLi = document.createElement("li");
nuevoLi.textContent = texto;
const lista = document.getElementById("lista-inicial");
lista.appendChild(nuevoLi);
}

View File

@@ -100,6 +100,9 @@ h1 {
color: #7a5200;
font-weight: bold;
}
.item-lista{
color:#d7263d;
}
/* =========================
IMAGEN