Created
April 6, 2016 14:08
-
-
Save bramus/a9c1bad426e6f4fd9af0f19ecb2e24a3 to your computer and use it in GitHub Desktop.
List of valid HTML Elements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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
output 2023.05.02:
"html","base","head","link","meta","script","style","title","body","address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","cite","dd","dt","dl","div","figcaption","figure","hr","li","ol","ul","menu","p","pre","a","abbr","b","bdi","bdo","br","code","data","dfn","em","i","kbd","mark","q","rp","ruby","rt","s","samp","small","span","strong","sub","sup","time","u","var","wbr","area","audio","img","map","track","video","embed","iframe","object","picture","source","portal","svg","canvas","noscript","del","ins","caption","col","colgroup","table","tbody","tr","td","tfoot","th","thead","button","datalist","option","fieldset","label","form","input","legend","meter","optgroup","select","output","progress","textarea","details","summary","dialog","slot","template","acronym","applet","bgsound","big","blink","center","dir","font","frame","frameset","image","keygen","marquee","menuitem","nobr","noembed","noframes","param","plaintext","rb","rtc","spacer","strike","tt","xmp"
(shadow and content are obsolete now, hgroup was missing in the last comment)