Skip to content

Instantly share code, notes, and snippets.

@jonsecchis
Forked from bramus/script.js
Created September 2, 2020 20:07
Show Gist options
  • Save jonsecchis/49c6c4516740f5f07ee34711f7c5d76b to your computer and use it in GitHub Desktop.
Save jonsecchis/49c6c4516740f5f07ee34711f7c5d76b to your computer and use it in GitHub Desktop.
List of valid HTML Elements
// Run this on https://developer.mozilla.org/en/docs/Web/HTML/Element
var tags = [], nodeList = document.querySelectorAll('td a code');
for (i in nodeList) {
if ((nodeList[i].innerText) && (nodeList[i].innerText.indexOf('<') > -1)) {
var tag = nodeList[i].innerText.replace('<','"').replace('>','"');
if (tags.indexOf(tag) == -1) {
tags.push(tag);
}
}
}
console.log(tags.join(','));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment