# Show HN: HTMS - Write JavaScript with HTML Tags

In a bold move that will likely raise some eyebrows, the developers of HTMS have created a system that allows you to write JavaScript code using HTML tags. That's right, folks - we're talking about a compiler that turns your HTML markup into executable JavaScript. But before you start shipping this out to production without adult supervision, let us give you a heads up: it's still a work in progress.

HTMS is built around a set of HTML tags that allow you to create control flow and DOM elements with ease. You can use tags like ``, ``, ``, ``, and even plain-old `

` to build your JavaScript applications. It's a bit like having two languages in one, which might sound appealing at first but could also lead to some interesting debugging sessions.

But how does it work? Well, when you write your code in HTMS, it gets compiled into JavaScript with safety checks and plenty of side-eye (read: warnings) to help prevent you from doing something silly. And if you want to see the magic for yourself, you can run `npx ts-node main.ts demos/mixed-tags.html` to generate a demo that showcases the system's capabilities.

The demo in question is based on the simple todo-app.html file, which gets compiled into demos/todo-app.js and then rendered in demos/todo-app.index.html. The result is a fully functional todo app with an input field, an "Add" button, a keyed list, and removal buttons - all built using HTMS tags.

So what's behind this innovative system? The answer lies in the HTMS compiler, which takes your HTML markup and converts it into JavaScript that can be executed directly in the browser. It's a clever solution that lets developers build web applications without having to worry about the underlying plumbing.

While we're not ready to ship this out just yet, HTMS is certainly an interesting development that's worth keeping an eye on. Who knows what other creative uses we'll find for it?

# Example Use Cases

* Building custom UI components with ease * Creating interactive web applications without JavaScript expertise * Rapid prototyping and testing of web app ideas

Note: As mentioned earlier, this system is still a work in progress and should not be used in production without adult supervision. However, it's an exciting development that shows the possibilities of combining HTML and JavaScript.

RETURN TO BLOG