참고 :
node 속성
const blue = documnet.getElementById('blue');
const blueTextNode = blue.firstChild;\
blueTextNode.nodeName;
blueTextNode.nodeType;
blueTextNode.nodeValue;
blueTextNode.nodeValue='파랑';
Markup Text 삽입 시 innerHTML
const blue = documnet.getElementById('blue');
blue.innerHTML = '<li>Blue</li>';
노드 추가
→ method . 1
const newLi = document.createElement('li');
newLi.innerHTML = 'pink';
const ul = document.getElementById('color');
ul.appendChild(newLi);
→ method . 2
const newLi2 = document.createElement('li');
const newText = document.createTextNode('삽입 할 text 작성');
const ul2 = document.getElementById('color');
ul2.appendChild(newLi2);
const target = document.getElementById('targetId');
ul2.insertBefore(newLi2,target);

노드 복제
const newLi = document.createElement('li');
const newClone = newLi.cloneNode();
const newClone2 = newLi.cloneNode(true);
노드 제거
const ul = document.getElementById('targetId');
ul.removeChild(targetNode);
ul.removeChild(ul.firstElementChild);
ul.removeChild(ul.lastElementChild);