📜 ⬆️ ⬇️

How I want to see HTML6

I want to warn you in advance that here you will not find any research on the development of the web and html in particular. There will be no assessment of the importance of CSS3 or the semantics of tags html4 - html5. It's just a cry into the void about what tool I, as a coder, would like to use.
If interested, please welcome under cat.

Take the classic case: site footer.
It can be done like this:
<div class=”footer”> … </div> 

But with the same success:
 <footer> … </footer> 

And you can:
 <section class=”footer”> … </section> 

But these options are semantically correct (section is not for all cases, but these are trifles). But there is also:
 <p class=”footer”> … </p> <span class=”footer”> … </ span> 
, or:
 <table class=”footer”> <tr> <td> … </td> <tr> </table> 
, even:
 <a class=”footer”> … </a> <b class=”footer”> … </b> 

And all this diversity can be represented exactly the same with the help of css!
Moreover. Once I saw a site completely made of blocks like this:
 <ul class=”footer”> <li>… </ul> 
In this case, the css was written:
 ul {display:table; … } li {display:table-cell; … } 

So what's the point then in all these tags? After all, 9 out of 10 tags are interchangeable with css. And for the user, the result is all the same.

And we smoothly approached another problem: If 9 out of 10 are interchangeable, then why is this 1 out of 10 unsettling?

An example of such a tag is <textarea>
To at least repeat the functionality of <textarea> and its design with, for example, <div> 'and you have to load the page with extra scripts and add a significant number of lines to css. On the other hand, <textarea> is practically incapable of repeating the functionality of any other tag.
')
And I have not mentioned about the "technical" tags.
For example, connecting external files.
The most logical tag for the name - <link> . That's right, to add the favicon we add to <head> :
 <link rel="shortcut icon" href=" … "> 

What would connect the style sheet
 <link rel="stylesheet" type="text/css" href=" … "> 

To enable javascript
 <script type="text/javascript" src=" … "></script> 

What? Yes that's right. We connect everything with the help of the <link> tag , and scripts with the help of the <script> tag . It would be clear if the styles were connected with the <style> tag . Because in it, as in <script> you can write the body of the style sheet itself (or script), but alas.

It seems that with the standards of html, it happened about the same as with the state standards. When initially a set of rules was invented to facilitate the work, but in the end only complicates it.

And now, I still tell you how I would like to see html.

First of all: 5 tags in total.
  1. <a> ... </a> - standard closed tag, full analogue of the modern <div> 'a
  2. <b> ... is a tag that does not require closure, the closest to it is from modern <li> tags. But, if you apply a hard rule: \ r and / or \ n, as well as the following <b> or closing parent </a> - are closed tag. You can use it like h2 and for similar cases.
  3. <c /> - standard tag without “innerContent” but with “value” are buttons, input fields and similar elements.
  4. <d /> is an empty tag used for styling. The closest analogues are <br /> and <hr /> . But also they can make the logo, or once popular snowflakes for the new year.
  5. <e /> is a technical tag, replacing with modern <link> , <meta> , <script> and others like them.

Secondly : the initial, but more crude CSS-reset - a complete match of the styles of all the described tags, except for <e /> - it is invisible. In fact, the first 4 of the above tags should have the original style of the modern <span> .

Third : full transfer of all design rights from html to css (or its equivalent). I want to be able to apply both the full and partly styling of the above <textarea> to any of the first 4 tags.

Fourthly : complete transfer of control rights from html to javascript (or its equivalent). Even the functionality of elementary checkboxes should be given away. Again, all in order to be able to apply all or part of the <textarea> functionality to any of the first 4 tags.

It goes without saying that frameworks will be used for both javascript and css, which will remove the disadvantage of the increased complexity of some standard points: the absence of tags <b>, <i>, <u> , etc.

PS Of course, I would like to change a lot in css, but that's another story.

Upd Apparently, in vain clearly did not indicate one thing:
All other unaffected little things html remain as they are. Which means: attributes are still possible and necessary to use (otherwise, how to distinguish one block from another with the same tag?); events are still generated.

Source: https://habr.com/ru/post/140920/


All Articles