Can anyone point me to (or post) an array of every HTML tag [closed] Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Can anyone point me to (or post) an array of every HTML tag [closed] without wasting too much if your time.

The question is published on by Tutorial Guruji team.

Can anyone point me to a way to generate an array (or a pre-generated array) of every HTML tag as a string? I need this because I have a library which expects me to whitelist every tag I want (and I want all of them). I tried to Google for this, but was (surprisingly) unable to find it.

In other words, the array would look something like:

const htmlTags = ['a', 'base', 'br', ...]

Answer

I went to MDN, copied the tags from the screen. I replaced < with “, I replace > with “, and manually deleted the headings

["a",
"abbr",
"acronym",
"address",
"applet",
"area",
"article",
"aside",
"audio",
"b",
"base",
"basefont",
"bdi",
"bdo",
"bgsound",
"big",
"blink",
"blockquote",
"body",
"br",
"button",
"canvas",
"caption",
"center",
"cite",
"code",
"col",
"colgroup",
"content",
"data",
"datalist",
"dd",
"decorator",
"del",
"details",
"dfn",
"dir",
"div",
"dl",
"dt",
"element",
"em",
"embed",
"fieldset",
"figcaption",
"figure",
"font",
"footer",
"form",
"frame",
"frameset",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"head",
"header",
"hgroup",
"hr",
"html",
"i",
"iframe",
"img",
"input",
"ins",
"isindex",
"kbd",
"keygen",
"label",
"legend",
"li",
"link",
"listing",
"main",
"map",
"mark",
"marquee",
"menu",
"menuitem",
"meta",
"meter",
"nav",
"nobr",
"noframes",
"noscript",
"object",
"ol",
"optgroup",
"option",
"output",
"p",
"param",
"plaintext",
"pre",
"progress",
"q",
"rp",
"rt",
"ruby",
"s",
"samp",
"script",
"section",
"select",
"shadow",
"small",
"source",
"spacer",
"span",
"strike",
"strong",
"style",
"sub",
"summary",
"sup",
"table",
"tbody",
"td",
"template",
"textarea",
"tfoot",
"th",
"thead",
"time",
"title",
"tr",
"track",
"tt",
"u",
"ul",
"var",
"video",
"wbr",
"xmp"]
We are here to answer your question about Can anyone point me to (or post) an array of every HTML tag [closed] - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji