raphaellouis
2022-05-04
Hi all!
Reasons
- I would like better accessibility for HTML. Part of the implementations of HTML make a language very difficult to implement or make works. This is not a criticism but a point of view that I want to mention here.
- An important issue is that a lot of software that reads HTML is old and some tags don’t work.
- So, I wish HTML was like as pugjs. Here an demo. Because pugjs has a better format for text than html would.
- There are several implementations to make html programmable like pugjs - as I said before and HTML-as-programming-language
- Most web frameworks do this like vuejs, react-js, svelte-js, mithril-js among others - make html programmable
- There is no standardization on html programming, so there are several frameworks for this, which can be good on the one hand with diversity of choices and bad on the other, because we don’t have a standard. I consider having a pattern something interesting and relevant, because it is a process by which we all do things with a certain logic, production, creation, development. Which is great in the sense of having something that everyone identifies with and wants. Note: I don’t want to criticize the html standard, on the contrary I’m thinking of ways to make it better without losing its standardization.
- I would like HTML to be more accessible and this could be done if the html somehow had a loop, conditionals and also support for including other documents within itself.
- I know html should be text only, but nowadays html is gaining more and more space and we could make awesome html if it had a format close to pugjs - As I argued before, pugjs is a good format for text and for screen readers because it is simple and easy.
“HTML” vs “Pug”
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Pug</title>
<script type="text/javascript"> if (foo) bar(1 + 5) </script>
</head>
<body>
<h1>Pug - node template engine</h1>
<div id="container" class="col">
<p>You are amazing</p>
<p>Pug is a terse and simple templating language.</p>
</div>
</body>
</html>
index.pug
doctype html
head
title Pug
script(type='text/javascript').
if (foo) bar(1 + 5)
body
h1 Pug - node template engine
#container.col
p You are amazing
p Pug is a terse and simple templating language.
Notes
- HTML 7 would be pugjs format but would have full support for new and old versions in the browser
- HTML 7 is almost a programming language, but it still focuses on text
- HTML 7 is highly modular and more accessible than HTML 5 or 6 would be
references
- HTML5 - MDN Web Docs Glossary: Definitions of Web-related terms | MDN
- Morioh
- GitHub - pugjs/pug: Pug – robust, elegant, feature rich template engine for Node.js
- GitHub - HTML-as-programming-language/HTML-as-programming-language: A programming language that looks like HTML
- GitHub - joelnet/html-lang: HTML is a Programming Language!
- GitHub - OscarGodson/HTML6: A spec to HTML6