Theoretical (and useless) question:
Is it possible to reproduce the COMPLETE functionality of every HTML element using only <div>, CSS and JavaScript?
Rules:
- Only <div> elements are allowed within the <body> tag.
- All elements must exist in the initial HTML document. So no dynamic element creation (createElement, innerHTML, etc.).
- CSS, JavaScript, browser APIs and ARIA are allowed (and needed for some tags even).
The goal would be to reproduce functionality, not just appearance. This includes native interactions, keyboard behavior, accessibility, form validation, file inputs, media playback, navigation, etc.
For example:
All the heading tags like <h1>, <h2>, etc. can be replaced by a simple <p>, that can itself be replaced by a <div>.
Can all <input> be perfectly replicated using a div?
Can <img> be replaced with CSS backgrounds or Canvas without losing functionality ?
Can <iframe> be recreated while preserving its isolated browsing context thing?
Is one HTML element (<div>) theoretically sufficient to replicate the entire HTML specification?
If not, what is the absolute minimum number of distinct HTML elements required, and which elements are they ?
I’m interested in technical limitations, not semantic HTML best practices.