Urgent.News

What's breaking now, across thousands of outlets.

Tech

Single-file HTML is underrated: lessons from shipping 50+ one-page sites

Everyone I know reaches for a framework before they've finished the sentence describing what they're building. Next.js for a landing page. A full CMS for a project retrospective. I've done it too. But over the last year I've shipped 50+ single-file HTML pages — reports, explainers, dashboards, interactive demos — and I've become convinced the humble .html file is the most underrated medium on the…

In a recent perspective piece, a developer argues that single-file HTML pages often go overlooked despite their potential. They recount shipping over 50 one-page sites and finding the simplicity of a single HTML file to be the most underrated web medium. Here are the key takeaways:

1. A single HTML file enforces a focused approach. With no components folder or build step, every element must justify its place. This forces concise writing and clear structure, often resulting in better content than complex frameworks allow.

2. Sharing via URL vastly improves distribution. Removing the setup and installation barriers makes content much more accessible. A simple link is easier to share than a repository or build, leading to 10 times more readers for documents, reports and explainers.

3. Portability is a major advantage. HTML files work offline, won't break over time, and don't rely on any platform. Pages created a decade ago still render perfectly today, a stark contrast to framework-based projects that can become obsolete.

4. Single-file isn't a one-size-fits-all solution. It breaks down when databases are needed, when there are many page types, or when multiple people edit simultaneously. The medium is best for static documents and demos, not complex applications. Recognizing when it's appropriate is crucial.

The author provides practical advice:

- Inline CSS and JS, but watch the file weight. Base64 images are convenient but can quickly bloat the file size. Keep the total under ~500KB, splitting images out if needed.

- Design for mobile first. Over 60% of page views come from mobile devices. If horizontal scrolling is required on small viewports, the layout fails.

- Include print styles. Five lines of CSS for print mode can transform a webpage into a genuinely useful document. This simple step is often overlooked.

- Use semantic HTML. Proper headings, paragraphs and alt text enhance SEO without any framework. The web was designed to be readable, and simple HTML achieves that goal.

The takeaway is to reconsider the default assumption that every project needs a framework. Before scaffolding a new site, ask if a well-crafted HTML page could suffice. In many cases, the answer is yes, and it will save time and ship faster.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Camiones autónomos 2024: Guía esencial para operadores y técnicos

Camiones autónomos en 2024: guía práctica para operadores logísticos y técnicos Introducción Los camiones sin conductor ya no son una promesa de futuro; están circulando en las autopistas de EE. UU.

  • Camiones autónomos operativos en EE.UU. y Europa en 2024
  • Regulaciones de DOT y UE requieren certificación y reportes telemáticos
  • Ahorro operativo del 12-18% y mejor puntualidad con flotas autónomas

Open US Tariff Datasets You Can Actually Build With (2026): 5,689 HTS Codes, 60 Country Tiers, and a Machine-Readable Changelog

If you've ever tried to compute US import duties programmatically, you know the problem isn't the math — it's the data. The rates live in the USITC Harmonized Tariff Schedule (a website that fights…

  • Dataset contains 5,689 HTS codes and 60 country tiers with machine-readable changelog
  • Invoicetariff repository holds complete set of US tariff rules, including fee information
  • Data structured with legal basis and source link for each duty percentage

Autonomous Truck Pilots Spark Fierce Hacker News Debate

Massive Truck Test Announcements Ignite a Heated Debate on Hacker News Introduction The autonomous‑truck boom of 2024 is no longer a distant vision—it’s happening today , and every major logistics…

  • Tesla Semi and Waymo Via autonomous trucks spark Hacker News debate
  • EU permits Level 4 autonomy in restricted freight zones from January 2025
  • Fuel savings of 8.5% reported in platooned autonomous trucks

More from Saturday 10 October →