Elements are like HTML tags.
eg.
They start with a "<" and end with a ">".
Elements may not contain a "<" or ">" symbol, unless inside quotes.
Quotes
You may use quotes inside an element, in which case you may use "<" or ">" inside the quotes. You should use quotes where an argument (parameter) to a tag contains spaces or other special characters.
eg.
Single or double quotes are permitted. Whichever quote is used, the other one is permitted inside the quotes.
You can use entities inside elements to represent characters that are otherwise hard to use, in particular:
You might do this if you needed to use a single quote within a quoted string, eg.
(ie. this would send: take "Nick's sword" )
Defining your own elements
You can extend the language by defining your own elements, eg. if you want to use bold and underline a lot together you could do this:
This defines "bu" as <b><u>.
So, you could use it like this:
eg.
<bold> <color red>
They start with a "<" and end with a ">".
Elements may not contain a "<" or ">" symbol, unless inside quotes.
Quotes
You may use quotes inside an element, in which case you may use "<" or ">" inside the quotes. You should use quotes where an argument (parameter) to a tag contains spaces or other special characters.
eg.
<send "go west">
Single or double quotes are permitted. Whichever quote is used, the other one is permitted inside the quotes.
<send "take 'large sword'">
You can use entities inside elements to represent characters that are otherwise hard to use, in particular:
' - single quote
" - double quote ( or " )
You might do this if you needed to use a single quote within a quoted string, eg.
<send 'take "'Nick's sword"'>
(ie. this would send: take "Nick's sword" )
Defining your own elements
You can extend the language by defining your own elements, eg. if you want to use bold and underline a lot together you could do this:
<!ELEMENT bu '<b><u>' >
This defines "bu" as <b><u>.
So, you could use it like this:
You see a <bu>large</bu> rabbit!