Родители, дети
let mainDiv = document.getElementById('main-div'); // First get the div itself
let parent = mainDiv.parentNode; // the div's parent element
let children = mainDiv.children; // the div's children
let firstChild = mainDiv.children[0]; // the div's first child
let nextSibling = mainDiv.nextElementSibling; // the next element at the same nesting level
let prevSibling = mainDiv.previousElementSibling; // the previous element at the same nesting level
Gorgeous Goldfinch