const myElement = document.getElementById('foo');
for (let i = 0; i < myElement.children.length; i++) {
console.log(myElement.children[i].tagName);
} // Logs the name of all the children.
var child_element = document.querySelector("#id").children[0];
//Where # defines id and '.' a class. And 0 argument the first child element