get all classes in a html document code example Example: javascript get all classes var allHiddenElements = document.getElementsByClassName("hidden");