3 ms·
You don't need to close <p> tag, it closes automatically. Also supporting something as simple as </> (close current tag) would significantly reduce HTML boiler
by vbezhenar 4y ago
You don't need to close <p> tag, it closes automatically.
Also supporting something as simple as </> (close current tag) would significantly reduce HTML boilerplate without inventing new language. I agree that shortcuts for id and class are nice too.
My proposal:
<div.content>
<form#login>
<input name=username>
<input name=password>
</>
</>
- tannhaeuser 4y agoThat's almost SGML, except for the short form syntax for IDs: <div content> <form id=login> <input name=username> <input name=password> </> </> Note though that including markup declarations for enumerating custom class names and for the input element having declared content EMPTY is required (the latter declaration actually part of HTML DTDs [1]): <!attlist div class (content) #implied> <!element input - - empty> Moreover, in SGML you can have tag omission/inference, like on the p element or the html element itself. Your "</>" Close current tag syntax is actually part of SGML (as is "<>" which is treated as start element tag for the most recently closed element), known as FEATURES MINIMIZE SHORTTAG ENDTAG EMPTY and FEATURES MINIMIZE SHORTTAG STARTTAG EMPTY features, resp. ([2]). [1]: http://sgmljs.net/docs/w3c-html52-dtd.html http://sgmljs.net/docs/w3c-html52-dtd.html [2]: http://sgmljs.net/docs/sgmlrefman.html http://sgmljs.net/docs/sgmlrefman.html