07. HTML Elements

Input value refers to actual DOM elements in this context.

Standard HTML Elements

Input value getType() returns is<Type>() function(s)
<a> HTMLAnchorElement isHtmlElement(), isElement()
<abbr> HTMLElement isHtmlElement(), isElement()
<address> HTMLElement isHtmlElement(), isElement()
<area> HTMLAreaElement isHtmlElement(), isElement()
<article> HTMLElement isHtmlElement(), isElement()
<aside> HTMLElement isHtmlElement(), isElement()
<audio> HTMLAudioElement isHtmlElement(), isElement()
<b> HTMLElement isHtmlElement(), isElement()
<base> HTMLBaseElement isHtmlElement(), isElement()
<bdi> HTMLElement isHtmlElement(), isElement()
<bdo> HTMLElement isHtmlElement(), isElement()
<blockquote> HTMLQuoteElement isHtmlElement(), isElement()
<body> HTMLBodyElement isHtmlElement(), isElement()
<br> HTMLBRElement isHtmlElement(), isElement()
<button> HTMLButtonElement isHtmlElement(), isElement()
<canvas> HTMLCanvasElement isHtmlElement(), isElement()
<caption> HTMLTableCaptionElement isHtmlElement(), isElement()
<cite> HTMLElement isHtmlElement(), isElement()
<code> HTMLElement isHtmlElement(), isElement()
<col> HTMLTableColElement isHtmlElement(), isElement()
<colgroup> HTMLTableColElement isHtmlElement(), isElement()
<data> HTMLDataElement isHtmlElement(), isElement()
<datalist> HTMLDataListElement isHtmlElement(), isElement()
<dd> HTMLElement isHtmlElement(), isElement()
<del> HTMLModElement isHtmlElement(), isElement()
<details> HTMLDetailsElement isHtmlElement(), isElement()
<dfn> HTMLElement isHtmlElement(), isElement()
<dialog> HTMLDialogElement isHtmlElement(), isElement()
<div> HTMLDivElement isHtmlElement(), isElement()
<dl> HTMLDListElement isHtmlElement(), isElement()
<dt> HTMLElement isHtmlElement(), isElement()
<em> HTMLElement isHtmlElement(), isElement()
<embed> HTMLEmbedElement isHtmlElement(), isElement()
<fieldset> HTMLFieldSetElement isHtmlElement(), isElement()
<figcaption> HTMLElement isHtmlElement(), isElement()
<figure> HTMLElement isHtmlElement(), isElement()
<footer> HTMLElement isHtmlElement(), isElement()
<form> HTMLFormElement isHtmlElement(), isElement()
<head> HTMLHeadElement isHtmlElement(), isElement()
<header> HTMLElement isHtmlElement(), isElement()
<h1> HTMLHeadingElement isHtmlElement(), isElement()
<h2> HTMLHeadingElement isHtmlElement(), isElement()
<h3> HTMLHeadingElement isHtmlElement(), isElement()
<h4> HTMLHeadingElement isHtmlElement(), isElement()
<h5> HTMLHeadingElement isHtmlElement(), isElement()
<h6> HTMLHeadingElement isHtmlElement(), isElement()
<hr> HTMLHRElement isHtmlElement(), isElement()
<html> HTMLHtmlElement isHtmlElement(), isElement()
<i> HTMLElement isHtmlElement(), isElement()
<iframe> HTMLIFrameElement isHtmlElement(), isElement()
<img> HTMLImageElement isHtmlElement(), isElement()
<input> HTMLInputElement isHtmlElement(), isElement()
<ins> HTMLModElement isHtmlElement(), isElement()
<kbd> HTMLElement isHtmlElement(), isElement()
<label> HTMLLabelElement isHtmlElement(), isElement()
<legend> HTMLLegendElement isHtmlElement(), isElement()
<li> HTMLLIElement isHtmlElement(), isElement()
<link> HTMLLinkElement isHtmlElement(), isElement()
<main> HTMLElement isHtmlElement(), isElement()
<map> HTMLMapElement isHtmlElement(), isElement()
<mark> HTMLElement isHtmlElement(), isElement()
<menu> HTMLMenuElement isHtmlElement(), isElement()
<meta> HTMLMetaElement isHtmlElement(), isElement()
<meter> HTMLMeterElement isHtmlElement(), isElement()
<nav> HTMLElement isHtmlElement(), isElement()
<noscript> HTMLElement isHtmlElement(), isElement()
<object> HTMLObjectElement isHtmlElement(), isElement()
<ol> HTMLOListElement isHtmlElement(), isElement()
<optgroup> HTMLOptGroupElement isHtmlElement(), isElement()
<option> HTMLOptionElement isHtmlElement(), isElement()
<output> HTMLOutputElement isHtmlElement(), isElement()
<p> HTMLParagraphElement isHtmlElement(), isElement()
<picture> HTMLPictureElement isHtmlElement(), isElement()
<portal> HTMLUnknownElement isHtmlElement(), isElement()
<pre> HTMLPreElement isHtmlElement(), isElement()
<progress> HTMLProgressElement isHtmlElement(), isElement()
<q> HTMLQuoteElement isHtmlElement(), isElement()
<rp> HTMLElement isHtmlElement(), isElement()
<rt> HTMLElement isHtmlElement(), isElement()
<ruby> HTMLElement isHtmlElement(), isElement()
<s> HTMLElement isHtmlElement(), isElement()
<samp> HTMLElement isHtmlElement(), isElement()
<script> HTMLScriptElement isHtmlElement(), isElement()
<section> HTMLElement isHtmlElement(), isElement()
<select> HTMLSelectElement isHtmlElement(), isElement()
<slot> HTMLSlotElement isHtmlElement(), isElement()
<small> HTMLElement isHtmlElement(), isElement()
<source> HTMLSourceElement isHtmlElement(), isElement()
<span> HTMLSpanElement isHtmlElement(), isElement()
<strong> HTMLElement isHtmlElement(), isElement()
<style> HTMLStyleElement isHtmlElement(), isElement()
<sub> HTMLElement isHtmlElement(), isElement()
<summary> HTMLElement isHtmlElement(), isElement()
<sup> HTMLElement isHtmlElement(), isElement()
<table> HTMLTableElement isHtmlElement(), isElement()
<tbody> HTMLTableSectionElement isHtmlElement(), isElement()
<td> HTMLTableCellElement isHtmlElement(), isElement()
<template> HTMLTemplateElement isHtmlElement(), isElement()
<textarea> HTMLTextAreaElement isHtmlElement(), isElement()
<tfoot> HTMLTableSectionElement isHtmlElement(), isElement()
<th> HTMLTableCellElement isHtmlElement(), isElement()
<thead> HTMLTableSectionElement isHtmlElement(), isElement()
<time> HTMLTimeElement isHtmlElement(), isElement()
<title> HTMLTitleElement isHtmlElement(), isElement()
<tr> HTMLTableRowElement isHtmlElement(), isElement()
<track> HTMLTrackElement isHtmlElement(), isElement()
<u> HTMLElement isHtmlElement(), isElement()
<ul> HTMLUListElement isHtmlElement(), isElement()
<var> HTMLElement isHtmlElement(), isElement()
<video> HTMLVideoElement isHtmlElement(), isElement()
<wbr> HTMLElement isHtmlElement(), isElement()

Custom HTML Elements

class MyElement extends HTMLElement {}
customElements.define("my-element", MyElement);

const v1 = document.createElement("my-element");
getType(v1) // "MyElement"
isCustomElement(v1); // true
isHtmlElement(v1); // true
isElement(v1); // true

// extending anything other than an HTML element (with "is")
class MyParagraph extends HTMLParagraphElement {}
customElements.define("my-paragraph", MyParagraph, { extends: 'p' });

const v2 = document.createElement("my-paragraph");
getType(v2) // "HTMLElement"
isCustomElement(v1); // true
isHtmlElement(v1); // true
isElement(v1); // true
Input value getType() returns is<Type>() function(s)
<my-element> MyElement isCustomElement, isHtmlElement(), isElement()
<my-paragraph> HTMLElement isCustomElement, isHtmlElement(), isElement()

NodeList and HTMLCollection

NodeList and HTMLCollection have a lot in common, but aren't exactly the same thing. If you need consistency between the two you can convert them to Arrays using Array.from().

Input value getType() returns is<Type>() function(s)
document.querySelectorAll('<li>') NodeList isElementCollection(), isIterable()
document.forms HTMLCollection isElementCollection(), isIterable()