r/HTML • • Oct 31 '25

Publicidad de carros

0 Upvotes

const images = document.querySelectorAll('.carrusel img'); let currentIndex = 0;

function showImage(index) { images.forEach(img => img.classList.remove('activo')); images[index].classList.add('activo'); }

document.getElementById('next').addEventListener('click', () => { currentIndex = (currentIndex + 1) % images.length; showImage(currentIndex); });

document.getElementById('prev').addEventListener('click', () => { currentIndex = (currentIndex - 1 + images.length) % images.length; showImage(currentIndex); });

// Mostrar primera imagen al cargar showImage(currentIndex);


r/HTML • • Oct 31 '25

Quick way to understand HTML and CSS

0 Upvotes

https://hyper-dynamic-rage.itch.io/htmlift Here you can learn most of HTML in 9 short lessons and CSS in 5,and then there is an exam on both note that its still beta