WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

JavaScript DOM Elements



HOW TO find HTML Elements

There are a couple of ways to do this:.

  • Finding HTML elements by class name
  • Finding HTML elements by id
  • Finding HTML elements by tag name
  • Finding HTML elements by CSS selectors

HOW TO Find HTML Elements by Tag Name

For the paragraph

element


var x = document.getElementsByTagName("p");


elements inside "home":