Monthly Archives: September 2008

TSHML – two space html markup language

I invented an extremely lightweight markup language which is used as a shorthand to author html documents. I wouldn’t be surprised if it’s been independently developed by several (million) other developers, but in case it hasn’t, you saw it here first! 🙂 I called it TSHML – “two space html markup language”. It was inspired by coding in Python which uses whitespace in a similar fashion.

The rules are that one element is represented on one line, attributes can be optionally quoted in strings (double quotes are slash escaped) or not quoted (though they have to be if they contain spaces), childnodes are indented by two spaces, text nodes are created by specifying an attributes named “txt”.

He’s an example: – note i’ve substituted full-stops for spaces for the indent
..p class=myclass style=”padding: 0px 10px 5px 5px”
….a href= txt=”Click \”your mouse\” here”
..p class=myclass
….span txt=”Or click ”
….a href= txt=”your mouse”
….span txt=” here”

If you use TSHML then you’ll need to write a program to convert it to something useful, probably XML.