Every developer should have a foundational understanding of these HTML DOM Node APIs before taking on web frameworks.

This quick HTML Node guide will cover 21 of the most popular and widely used APIs in the HTML DOM Node:

  1. getElementById(id)
  2. getElementsByClassName(className)
  3. getElementsByTagName(tagName)
  4. getSelection()
  5. getElementsByName and querySelector(selector)
  6. querySelectorAll(selector)
  7. parentNode.insertBefore(newNode, refNode)
  8. appendChild(node)
  9. createElement(elementName)
  10. createTextNode(textString)
  11. removeChild(childNode)
  12. replaceChild(newNode, childNode)
  13. setAttribute(attrKey, attrValue)
  14. getAttribute(attrKey)
  15. getAttributeNames()
  16. cloneNode()
  17. classList
  18. parentNode
  19. parentElement
  20. innerHTML
  21. innerText

Every developer should have these APIs at their fingertips before taking on web frameworks. Mastering them is the best way to build a foundational understanding of when and how to use the frameworks.

Let’s dive in.

#html5 #html #node #web-development

HTML5 Node Cheat Sheet: 21 APIs You Should Know in 2020
4.10 GEEK