O GoConqr está de visual novo! Conte para nós o que você achou.

Módulo 3 de 21 · Mídia

Selecting Elements

Kostas Diakogiannis

Selecting Elements

Selecting DOM elements

Generally speaking there are many different ways to select elements from an HTML document. We use these functions:

document.body  // returns the whole body element of the html document

document.getElementById('unique') // returns the element with the id set to 'unique'

document.getElementsByTagName('H3') // returns an array with all h3 elements

document.getElementsByClassName('bigSize')  // returns an array with this class elements

document.querySelector('p.intro') // CSS selector type. Returns the first element that is a p and has a class 'intro'

document.querySelectorAll('div img') // returns an array with images that lie inside a div

 

Find a full list here!

Instruções

Para avançar no curso, envie uma tentativa deste quiz. Você pode enviá-la depois da última pergunta.

Ir para o módulo escolhido

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?