What is HTMLUnknownElement?
February 13, 2021

It is exactly what it sounds. An unknown element.

HTMLUnknownElement is an interface that means an invalid HTML element.

As per W3 cubs docs, it derives from the HTMLElement interface, but without implementing any additional properties or methods.


Image Source: w3cubs

In JavaScript, document.createElement() method creates an HTMLUnknownElement if tagName isn’t recognized.

Syntax of Document.createElement()

let element = document.createElement(tagName[, more options]);

As you can see in the syntax of createElement() above, if it can’t recognize the tagName then it will create HTMLUnknownElement.

Source: MDN


Leave a Reply

Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 How to set opacity or transparency using CSS? #3 Pagination in CSS with multiple examples #4 How to make HTML form interactive and using CSS? #5 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #6 How to uninstall Cocoapods from the Mac OS?

Recently Posted

Mar 5 How to create flickering text using CSS? Mar 4 How to use data-* Attributes in HTML? Mar 4 The substr() method in JavaScript and how it’s different from substring() Mar 4 A complete guide to add responsive YouTube videos using HTML and CSS Mar 3 How to embed YouTube or other video links in WordPress? Mar 3 How to change the Login Logo in WordPress?

You might also like these

The 8 Golden Rules of Programming I Have Learned in My CareerMiscWordPress: How to print ACF repeater field values?WordPressHow to create an empty array in Swift?SwiftSolution to “Call to undefined function mysql_error()” in RevSlider WordPress PluginWordPressLearn to make a responsive gallery using CSS Grid and without media queriesCSSAll possible ways you can Insert Data in PostgresPostgresIntroduction to components and templates Part 4: Pipes and DirectivesAngularKilling A Project Part 1: What criteria should be used to cancel/kill a project?MiscWhat Does Host-Based Intrusion Detection System (HIDS) Mean and What Are Some Advantages Over NIDS?MiscContent types in DrupalDrupalAdvanced Array Methods in JavaScript (with examples)JavaScriptQuery to increment or decrement value in MySQL ignoring negative valuesSQL/MySQL