A partial archive of discourse.wicg.io as of Saturday February 24, 2024.

[Proposal] “HTML7”

raphaellouis
2022-05-04

Hi all!

Reasons

  1. 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.
  2. An important issue is that a lot of software that reads HTML is old and some tags don’t work.
  3. So, I wish HTML was like as pugjs. Here an demo. Because pugjs has a better format for text than html would.
  4. There are several implementations to make html programmable like pugjs - as I said before and HTML-as-programming-language
  5. Most web frameworks do this like vuejs, react-js, svelte-js, mithril-js among others - make html programmable
  6. 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.
  7. 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.
  8. 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

  1. HTML 7 would be pugjs format but would have full support for new and old versions in the browser
  2. HTML 7 is almost a programming language, but it still focuses on text
  3. HTML 7 is highly modular and more accessible than HTML 5 or 6 would be

references

simevidas
2022-05-09

Based on your code example, the advantage of pug seems to be that you make fewer keystrokes.

raphaellouis
2022-05-09

@simevidas Hi! thank you for feedback… So… truth… and you it’s right! So… but…

  1. In my opinion html is increasingly full of information… so… one way to solve this is to “go back to the root”, ie use html as it was conceived at the beginning… a text format.
  2. There are formats that are very close to text such as pugjs, yaml. In my humble opinion pugjs is an interesting format. It does not affect reading, and it is already implemented in most programming languages. Furthermore, is well-known, reliable, secure and highly specified format. My hope would be that everything would be done in pugjs format as I mentioned. There is a certain beauty and design to the pugjs format. This is not a criticism of html, I would like to improve the html format.
  3. There are users with certain difficulties in using html - these users usually have to use specific software which usually has to read the content of the html tag and then the text. Instead of just reading the text… these softwares, as I said, read everything… tags, html elements and text.
  4. Part of my request is to help users who have html difficulties and have to use bad software that needs to read the html content along with the text… which in my view hurts reading… That’s why I said html it’s not accessible in the sense that a normal reading… is usually a mixture of tag and text…
  5. Also, my proposal for HTML7 would be futuristic… as it would reduce the information that is inside the html. To be realistic, I use pugjs that has the base I need. In short, HTML7 is the pugjs format applied to the web, to browsers. This would solve the problem of the various frameworks that handle html.

What do you think of these ideas, arguments?

raphaellouis
2022-05-09

@bahrus Hi! thanks for the like here… this post [Proposal] “HTML7”

simevidas
2022-05-09

So you want to remove information from HTML?

raphaellouis
2022-05-09
  1. I wanted an native API to manipulate the HTML… the name of this api I named as “HTML7” which is a futuristic html specification for reading mode - this api, or rather “HTML7” is based on pugjs…
  2. That’s why I said, to go back to the root, in the sense that we have an api for html-based text manipulation
  3. So… I’m not removing the information from the html, I’m trying or looking for some way to manipulate the html for what I need
  4. I know there are several types of frameworks for this, but I wish there was an official api for this, without frameworks like I said earlier
  5. One of the problems of not having a native html api is that you have to use third party tools for that - this is a common and general problem for developers, companies or users
  6. Even with the official specification of HTML5 or HTML6 there is still no native html manipulation api - What currently exists is custom elements
  7. Any link I have provided here is not for publicity, it is just for reference bibliography
  8. More references
raphaellouis
2022-05-14

When we write a pug code it generates customizable elements by javascript

# new api custom elements "HTML 7"
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.
            
// generate api with web elements
var head = document.registerElement('head');
var title = document.registerElement('title');
var script = document.registerElement('script');
var body = document.registerElement('body');
var p = document.registerElement('p');
document.body.appendChild(new head());
document.body.appendChild(new title());
document.body.appendChild(new title());
document.body.appendChild(new p());
document.body.appendChild(new body());

output

<!--- generate html  --->
<head>
  <title> Pug </title>
    <script>
      <body>
      <h1> Pug - node template engine </h1>
     <p> You are amazing </p>
     <p> Pug is a terse and simple templating language. </p>
</body>
</head>

Reference

ox-harris
2022-05-24

Hi @raphaellouis , does the OOHTML proposal help? Seems to cover much of what described.

Here: GitHub - webqit/oohtml: Object-Oriented HTML - a WICG proposal

raphaellouis
2022-05-24

@ox-harris Thank you very much for writing this message, I was very happy with your message, your feedback! really, that’s exactly what I want!