Method 1 • Direct CDN Import
How to Render HTML Datalist
Using Direct CDN Import
Learn how to generate native HTML5 <datalist> elements directly from CDN imports into standard browser ES Modules without bundlers or npm installations.
Concept
The 3-Step CDN Datalist Story
1
1. Input with list=""
Create an input linked to an ID: <input list="cities-list" /> and a container for the datalist.
2
2. Import from CDN
Import the runtime from jsDelivr via native <script type="module">.
3
3. Mount & Enjoy Autocomplete
The datalist is injected into the container. The browser handles matching, dropdown menus, and arrow keys natively.
Implementation
Complete HTML Page Example
Live Experience
Interactive CDN Demo & Code Generator
Ready
⌨️ Live Autocomplete Input
list="cdn-datalist-output"Notice: The suggestions below are generated by the native browser UI.
Current Input Value:
(Empty)
Execution Console Log
Ready.
Active CDN Snippet
This snippet matches your active suggestion list in real time.