HTMLB

Imagine HTML alone could do some stuff but not all stuff.
Download Documentation FAQ

HTMLB is an alternative HTML specification designed to extend HTML with a small set of custom tags that offer client-side rendering without JavaScript. Note that the word "alternative" is used, not "replacement".

Example
<variable set="who" to="<urlparam name='name' default='Stranger'/>">
<p>Hello, <variable get="who"/>!</p>
Open page.html?name=Alice => "Hello, Alice!"

First, some context

Comic

Just in case I didn't make that clear, the current HTML specification is controlled by Google and updated multiple times a week, often adding features many developers do not need.

If you don't believe me when I say the specs are ridiculously gigantic, you can check it out yourself. It is too large for independent developers to implement it from scratch, leaving them no other option but to fork an existing browser, *cough, cough* Chromium.

HTML/CSS/JS was created for making web pages, but it has now become in the ultimate frameworkTM that covers all the bazillion different use cases a theoretical application might have on any possible electronic device.

The joke is that all shapes fit in the square hole

Soon it will be an OS that runs on top of your the other OS.

And without JavaScript, HTML alone cannot be truly dynamic. Even with <dialog> and <details>, you are limited. <template> itself still needs JavaScript, half of the tags are just <div> but with other name, they're just SEO nonsense that we don't care about. So you are left with server side rendering, which sucks if you want to use a service like Neocities or any simple HTTP server that only return files.

HTMLB is my proposal as an alternative for the 4 people who care about this issue.


No JavaScript? No Problem

HTMLB adds command-like tags that make HTML dynamic, even in browsers without JavaScript.

Tag What it does
<variable>store / recall variables (set / get)
<urlparam>read URL query ?key=value
<calc>math and string ops (+ - * / %, len, upper, lower, substr, replace, match, search, rand)
<if>conditionals (value, eq, gt, lt, empty, not, img, htmlb)
<switch> / <case>multi-way branching
<template> / <call> / <param>reusable blocks with parameters
<moddoc>modify another element by id
<include>include other files to your website

Text-Only Browser? Still No Problem

The <if not img> tag lets you serve alternative content for text-only browsers, like ASCII art instead of images.

<if not img>
  .--.
 / o o \   HTMLB works here too!
 |  ^  |
  \_-_/
</if>
<if img>
  <img src="logo.png" alt="HTMLB Logo">
</if>

More Power for Attributes

With HTMLB you can insert self-closing tags directly inside any attribute.

<a href="<urlparam name='next' default='index.html'/>">Next</a>
<img src="avatar.png" alt="<variable get='username'/>">

Can I Use HTMLB?

Yes. Try it with this special fork of the Links browser with HTMLB support. It's still under development, but it works.

Download for Windows
Download for Linux
View Source Code

How can I help?

This project is self-sustaining simply by virtue of its existence and requires no financial resources, so it will endure forever and ever. Unlike most open source software projects, boom!

You can support this project and bring HTMLB to life just by making websites that support HTMLB.

In your main website, add a link to your page that supports HTMLB (for example, index_b.html), or you can add this button to indicate that this page supports HTMLB.

HTMLB works with any HTTP server and Web Hosting Service, so you can use Neocities or Nekoweb to host your HTMLB files

To learn more about HTMLB, you can read the docs


Isn't this just Javascript again?

No, JavaScript is a scripting language with a standalone engine that continues to run even after the page has loaded. HTMLB is an extension of HTML with additional tags that enable client-side preprocessing to generate dynamic content, but once the page has loaded, no further logic is executed, just like in classic HTML.

Why not server side rendering?

To use server-side rendering, you need tools like PHP or Node.js, which means you can't just host text files with a basic web hosting provider like Neocities or file sharing protocols like FTP. Plus, I like the server to do as little work as possible.

Doesn't this bring the same problems as JavaScript?

It sounds like you have a trauma with JS.

The Links browser doesn't support position: absolute, so you don't have to worry about modals and dialog boxes.

Theoretically, ads and paywalls can be integrated on server-side and will still work in this browser, but at that point, that's not JS's fault, and it's not HTMLB either, since this also applies to classic HTML, it's only purely human greed that's to blame.

What about Ladybird?

So the problem is that there are only two giant browser engines on the market (Chromium and Firefox). No problem, we’ll build another one from scratch, and now there are three, which is a crowd, as the saying goes.

This solves, to some extent, the problem of having few options when choosing a browser engine, but it does nothing to address the ridiculous complexity of the modern web.

What about HTMX?

HTMX it's Javascript

But why...?

Just try it, man.