Build it in HTML

One technique per guide, each with a live example you can try, edit and copy.

Guides 361-420 of 848. Page 7 of 15.

capacitor html
Capacitor with a single HTML file
What Capacitor does with an HTML file, a working single-file page you can try here, the commands to wrap it as an iOS or Android app, and the usual mistakes.
html5 speech recognition
HTML5 speech recognition with the SpeechRecognition API
Turn speech into text in a web page with the SpeechRecognition API. Live examples to try, code to copy, and fixes for permission, prefix and stops-listening errors.
babel html
Use Babel in a single HTML file
Babel is a JavaScript compiler. Load it from a CDN and a text/babel script tag turns JSX and modern JavaScript into code a browser runs. Live examples and fixes.
broadcast html graphics
Broadcast HTML graphics with the BroadcastChannel API
Drive an on-screen HTML graphic from another tab with the BroadcastChannel API. Live controller and scoreboard examples, code to copy, and why messages go missing.
squarespace code block css
Squarespace code block: add HTML, CSS and JavaScript
Add HTML, CSS and JavaScript to a Squarespace Code block: the Type setting, style tags, a snippet to copy, and fixes for code that shows up as plain text.
html vibration api
Make a phone vibrate from a web page with the Vibration API
Make a phone vibrate from a web page with navigator.vibrate(). Live examples, pattern arrays, the tap rule, why it does nothing on some devices, and a fallback.
storage event html
The storage event in HTML: react when another tab changes localStorage
The storage event fires in other tabs when localStorage changes. The smallest two-tab example, the event fields, and why it skips the tab that made the change.
bulma html
Bulma in a single HTML file
Bulma in a single HTML file: the one link tag that loads it, a starter page, columns that stack on phones, the few lines of JavaScript it leaves to you, and fixes.
pyodide wasm
Run Python in a single HTML file with Pyodide
Pyodide runs Python in the browser through WebAssembly. A working single-file HTML example, how to show output and load packages, and the mistakes to avoid.
outlook textformat html
TextFormat in HTML: the textformatupdate event, and the Outlook mix-up
textformatupdate is a browser event that tells a custom editor which text an IME is composing to underline. Live examples, TextFormat values, and the Outlook mix-up.
react uievent
React UIEvent: what the browser gives you, and what React hands your handler
UIEvent is the browser interface behind clicks, keys, focus and wheel events. See detail and view in a live page, and what React.UIEvent hands your handler.
svg path element html
The SVG path element in HTML, and SVGPathElement in JavaScript
What the SVG path element is in HTML and what SVGPathElement gives you in JavaScript: measure a path, walk along it, build one in code. Live examples to copy.
splide js
Splide JS in a single HTML file
Splide JS is a slider and carousel library. The smallest single-file HTML that works from a CDN, the options that matter, common mistakes, and how to share it.
reportingobserver api
Catch browser reports with ReportingObserver
ReportingObserver is a browser API that hands your JavaScript the deprecation and CSP violation reports the browser makes. Live demos, code to copy, and fixes.
html text event
HTML text events: TextEvent, textInput, and what to use instead
TextEvent and the textInput event are deprecated. See what fires when someone types in an HTML text field, with live examples, and which events to use today.
brython html
Brython in HTML: run Python from one file
Brython runs Python inside an HTML page. Copy a one-file example, see the three parts it needs, the mistakes that stop it, and how to share the page as a link.
digital clock javascript
A digital clock in JavaScript, in one HTML file
Build a digital clock in JavaScript in one HTML file: the smallest working code, how each line works, 12-hour and alarm versions, common mistakes and a share link.
analog clock css
Build an analog clock with HTML and CSS
Build an analog clock with HTML, CSS and a little JavaScript. Live examples, the hand-angle formulas, a fix for the backward-spinning second hand, and a share link.
copy to clipboard javascript
Copy to clipboard with JavaScript in a single HTML file
Copy to clipboard with JavaScript in one HTML file: a working example, the fallback, formatted copy, the click rule, React and console notes, and fixes.
infinite scroll javascript
Create infinite scroll in JavaScript, in one HTML file
Build infinite scroll in JavaScript with one HTML file and no library: the smallest working version, how it works, common mistakes, and how to share it as a link.
lazy loading images html
Lazy loading images in HTML: the smallest working version
Lazy loading images in HTML takes one attribute: loading="lazy". Live examples, a script version for CSS backgrounds, and the mistakes that undo it.
typing effect css
Typing effect in CSS: the smallest single-file version
A typing effect in CSS needs one HTML file and no JavaScript. Live examples, the CSS explained line by line, the usual mistakes, and how to share it as a link.
pagination javascript
Pagination in JavaScript: build it in one HTML file
Pagination in JavaScript is one slice and one subtraction. Live examples with page numbers and a table, the bugs to avoid, and how to share the page as a link.
weather app javascript
Build a weather app in JavaScript, in one HTML file
Build a weather app with JavaScript in one HTML file: build the API URL, fetch, check the answer, show it. Live examples, the code to copy and the usual fixes.
tic tac toe javascript
Tic tac toe in JavaScript, in a single HTML file
Tic tac toe in JavaScript, start to finish: a working game in one HTML file, how each part works, the bugs that break it, and how to share it as a link.
rock paper scissors javascript
Rock paper scissors in JavaScript, in one HTML file
Build rock paper scissors in JavaScript inside one HTML file: the smallest working code, how each line works, the common mistakes, and how to share it as a link.
random quote generator javascript
Make a random quote generator in one HTML file
Build a random quote generator in one HTML file with an array, Math.random and a button. Live examples, a no-repeat fix, and when you can skip a quote API.
color picker javascript
Build a color picker in JavaScript, in one HTML file
Build a color picker in JavaScript in one HTML file: the smallest working version, a custom picker with hex, copy and eyedropper, and a link to share it.
currency converter javascript
Build a currency converter with JavaScript in one HTML file
Build a currency converter in JavaScript inside one HTML file: a rates table, two dropdowns, one formula, Intl formatting, live examples and the mistakes to avoid.
unit converter javascript
Build a unit converter in one HTML file with JavaScript
Build a unit converter in JavaScript in one HTML file: working code, why a base unit beats pairs, temperature, a currency version, common bugs, and a share link.
expense tracker javascript
Build an expense tracker with HTML and JavaScript
Build an expense tracker in JavaScript in one HTML file: add, list, total and delete, with money kept in whole cents. Live examples, full code, common fixes.
pomodoro timer javascript
Make a pomodoro timer in JavaScript, in one HTML file
Build a pomodoro timer in JavaScript in one HTML file: the smallest working version, the focus and break cycle, the mistakes that lose time, and a share link.
javascript array map
Array.map in JavaScript: product price cards
Try Array.map in two live HTML demos. Build product price cards, inspect returned values, and avoid the common mistake.
javascript array filter
Array.filter in JavaScript: available product picker
Try Array.filter in two live HTML demos. Build available product picker, inspect returned values, and avoid the common mistake.
javascript array reduce
Array.reduce in JavaScript: shopping cart total
Try Array.reduce in two live HTML demos. Build shopping cart total, inspect returned values, and avoid the common mistake.
javascript array sort
Array.sort in JavaScript: numeric price sorting
Try Array.sort in two live HTML demos. Build numeric price sorting, inspect returned values, and avoid the common mistake.
javascript string split
String.split in JavaScript: comma-separated tag chips
Try String.split in two live HTML demos. Build comma-separated tag chips, inspect returned values, and avoid the common mistake.
javascript string replace
String.replace in JavaScript: first welcome-message placeholder
Try String.replace in two live HTML demos. Build first welcome-message placeholder, inspect returned values, and avoid the common mistake.
javascript string replaceall
String.replaceAll in JavaScript: complete badge-message update
Try String.replaceAll in two live HTML demos. Build complete badge-message update, inspect returned values, and avoid the common mistake.
javascript string trim
String.trim in JavaScript: pasted team-name cleanup
Try String.trim in two live HTML demos. Build pasted team-name cleanup, inspect returned values, and avoid the common mistake.
javascript object keys
Object.keys in JavaScript: editable settings fields
Try Object.keys in two live HTML demos. Build editable settings fields, inspect returned values, and avoid the common mistake.
javascript object entries
Object.entries in JavaScript: labeled department budget rows
Try Object.entries in two live HTML demos. Build labeled department budget rows, inspect returned values, and avoid the common mistake.
javascript number parseint
Number.parseInt in JavaScript: imported seat count
Try Number.parseInt in two live HTML demos. Build imported seat count, inspect returned values, and avoid the common mistake.
javascript number tofixed
Number.toFixed in JavaScript: two-decimal price display
Try Number.toFixed in two live HTML demos. Build two-decimal price display, inspect returned values, and avoid the common mistake.
javascript optional chaining
optional chaining in JavaScript: optional booking contact
Try optional chaining in two live HTML demos. Build optional booking contact, inspect returned values, and avoid the common mistake.
javascript destructuring
destructuring in JavaScript: booking summary fields
Try destructuring in two live HTML demos. Build booking summary fields, inspect returned values, and avoid the common mistake.
javascript spread
spread in JavaScript: independent preferences preview
Try spread in two live HTML demos. Build independent preferences preview, inspect returned values, and avoid the common mistake.
javascript array find
Array.find in JavaScript: booking reference lookup
Try Array.find in two live HTML demos. Build booking reference lookup, inspect returned values, and avoid the common mistake.
javascript array findindex
Array.findIndex in JavaScript: urgent ticket locator
Try Array.findIndex in two live HTML demos. Build urgent ticket locator, inspect returned values, and avoid the common mistake.
javascript array some
Array.some in JavaScript: overdue task alert
Try Array.some in two live HTML demos. Build overdue task alert, inspect returned values, and avoid the common mistake.
javascript array every
Array.every in JavaScript: launch readiness checklist
Try Array.every in two live HTML demos. Build launch readiness checklist, inspect returned values, and avoid the common mistake.
javascript array tosorted
Array.toSorted in JavaScript: independent catalog ordering
Try Array.toSorted in two live HTML demos. Build independent catalog ordering, inspect returned values, and avoid the common mistake.
javascript array reverse
Array.reverse in JavaScript: newest-first activity feed
Try Array.reverse in two live HTML demos. Build newest-first activity feed, inspect returned values, and avoid the common mistake.
javascript array toreversed
Array.toReversed in JavaScript: two views of one history
Try Array.toReversed in two live HTML demos. Build two views of one history, inspect returned values, and avoid the common mistake.
javascript array slice
Array.slice in JavaScript: three-result search preview
Try Array.slice in two live HTML demos. Build three-result search preview, inspect returned values, and avoid the common mistake.
javascript array splice
Array.splice in JavaScript: replace a workshop session
Try Array.splice in two live HTML demos. Build replace a workshop session, inspect returned values, and avoid the common mistake.
javascript array tospliced
Array.toSpliced in JavaScript: compare agenda revisions
Try Array.toSpliced in two live HTML demos. Build compare agenda revisions, inspect returned values, and avoid the common mistake.
javascript array concat
Array.concat in JavaScript: combine guest rosters
Try Array.concat in two live HTML demos. Build combine guest rosters, inspect returned values, and avoid the common mistake.
javascript array flat
Array.flat in JavaScript: workshop room roster export
Try Array.flat in two live HTML demos. Build workshop room roster export, inspect returned values, and avoid the common mistake.
javascript array flatmap
Array.flatMap in JavaScript: order packing board
Try Array.flatMap in two live HTML demos. Build order packing board, inspect returned values, and avoid the common mistake.