DOM structure:
Document
|
html
/ \
head body
| |
title button
Example:
title → "My website"button → "click here"Using child relationships:
const a = document.firstElementChild
.lastElementChild
.firstElementChild;
Using query selector:
const a = document.querySelector("button");
Changing button text:
a.innerHTML = "don't click here";
Properties (values describing state)
textContentinnerHTMLstylefirstChildMethods (functions that perform actions)