3 ms·
Because it is too powerful. You can do something like this: <div class="main"> oh <div class="sub"> hello </div> </div> This is valid HMTL but it is not a
by valenterry 6y ago
Because it is too powerful. You can do something like this:
<div class="main"> oh <div class="sub"> hello </div> </div>
This is valid HMTL but it is not a valid structure in any context that I could imagine, because what is the "oh" supposed to do there?
To prevent these (and other) mistakes, the way you can build up the structure should be restricted in a meaningful way and certainly not allow text and random positions and similar things. You could then describe this with a subset of HTML, but there isn't really any reason to choose it, except for "I'm used to it". Better choose your native programming language. And if it is not better than a HTML subset, maybe consider choosing your language.