Wednesday, January 11, 2012

A better markup language

I don't mean any disregard to Tim Berners-Lee, but I strongly dislike HTML. It's a bulky language that utilizes more bandwidth then necessary, and it's annoyingly close to object-oriented programming. With a few slight modifications developers could really merge it into existing languages; something like JSON.

This is what I have came up with recently:

<div id(myid):
Need a light-weight substitute for HTML? <a href(new.html): Click Here >!

Compare to the HTML version:

<div id="myid">
Need a light-weight substitute for HTML? <a href="new.html"> Click Here </a>!

Notice that [1.] parentheses (myId) are used instead of ="myId", [2.] elements are contained entirely in a single set of tags < > , unlike HTML that uses the < element > to open and the </ element > to close, and finally [3] text is separated from code with a colon.

This alternative HTML reduces bandwidth strain and the amount of time spent writing markup. However, this is not quite enough. It would be much better if the markup followed conventional object-oriented practices; elements are objects after all.
I haven't figured this part out yet; when, I do figure it out - I will make an update to this article. Maybe, we could even build an parser for the alternative HTML language.