1
I want to take an HTML element that is with a class, but that same class is in other elements.
<img class="imagens-noticias" src="imagens-noticias/noticia-1.png" alt="imagem">
<img class="imagens-noticias" src="imagens-noticias/noticia-2.png" alt="imagem">
<img class="imagens-noticias" src="imagens-noticias/noticia-3.png" alt="imagem">
There is the possibility to grab the first image, without affecting the others using pure Javascript?
Yes:
document.querySelector('.imagens-noticias');
takes the first element.– NoobSaibot