Introduction to LML 1.1

Mission statement - Introduction to LML - LML FAQ - LML tutorial - Political Activities - Membership information - About us

If you have already experience with LML you may want to go directly to the reference section.

LML is a Lightweight Markup Language, intended to replace HTML in the long term. If you are familiar with HTML, learning LML should be easy. If you don't know HTML, don't worry, LML is much easier to learn.


To write a LML document, all you have to do is open a normal text editor, like the notepad included with Windows. You can write a text, save it with a .lml ending or .html ending if your browser doesn't support this superior ending yet and you can see it immediately. The enormous advancement over plain text is that you can surround parts of your text with two so-called Tags to give it a special meaning. A starting tag is a keyword surrounded by "<" and ">", an ending tag is a keyword surrounded by "<" and "/>". We begin with a first example that specifies the title of a text:

<title>An Introduction to LML</title>

As you can see, the words "An Introduction to LML" are marked as a title. The title is usually the name of a document and most browser will show it on the window's title bar. The title of the document you are currently reading is "LML Introduction", so look at the window's title bar and see whether you can find it.


Next we show you how to use emphasized text and citations or references. Most (but not all) browser will render emphasized text with a bold font and citations with an italic font. Take a look at the following example:
LML offers you <strong>numerous</strong> advantages over other common hypertext document formats like <cite>HTML</cite>.

In this example the word "numerous" is marked with an <strong> tag and the word "HTML" is marked with an <cite> tag. Let's see what the result looks like:
LML offers you numerous advantages over other common hypertext document formats like HTML.


When writing a headline, you will want to make its font bigger than that of normal text. You can achieve that by using the headline tag, <h1>. See the following example:
<h1>This is a big headline</h1>

The whole sentence has been put between two tags, and this is what it will look like in your browser:

This is a big headline


Another important feature is the paragraph. Its letter is p, and a text surrounded by <p> tags will be separated from the text above and below it. Here is the example:
<p>This is the first paragraph</p>
<p>This is the second paragraph</p>
<p>This is the third paragraph</p>
The result looks like this:

This is the first paragraph

This is the second paragraph

This is the third paragraph





Now we will take a look at a very important tag which is a little bit different from the tags we have seen so far: the line break tag, <br>. The difference between normal tag and <br> is that it has no ending tag. In fact, the ending tag is optional and you probably wont want to use it.
The <br> tag is so important because on your browser you wont see any of the line breaks you enter (and see) on your text editor. So you have to use the line break to enforce a break.
As always, we will first give you an example of how to use it and then you can see what it does on your browser:
This is the first line.<br>
This is the second line.<br><br>
This is the third line. It is separated by two br tags.
This is a fourth line which has not been separated from the third by a br tag.<br>
This is a line that shows that you could also use a closing br tag if youd like to. <br></br>
This is the last line.

And here is what it looks like on your browser:

This is the first line.
This is the second line.

This is the third line. It is separated by two br tags. This is a fourth line which has not been separated from the third by a br tag.
This is a line that shows that you could also use a closing br tag if youd like to.

This is the last line.


The most important things in hypertexts are the links. You can mark any word and any sentence as a link. If the user clicks on it, he will go to the specified destination. In LML there are two types of hypertext links: internal and external. Internal links point to a different position in the document itself, external point to other pages. The anchor tag <a> can be used for all links (internal and external) and to give sections of your hypertext a name. The first example will show you how to name a section of your text and how to create a hyperlink that leads the user to this section:
<a name="head">The head</a><br>
Click on the this <a href="#head">link</a> to go to the head of the text.

As you can see in the first line, the text "the head" will be named as "head". The tag contains the new concept of an option. Inside of the tag's <> brackets there is a second keyword that you can assign a value to. In this case you assign the value "head" to the option "name". In the second line the word "link" is surrounded by an anchor that points to the section named in the line above. The href option specifies the name or URL of the anchor's destination. The "#" character is necessary to indicate that the link points to a name and not to a page. If you leave it out and you click on it, the browser will try to go to a URL or page with the name "head", and this would be an external link. But before we introduce the external link, take a look at the result of the last example:
The head
Click on the this link to go to the head of the text.

Now we create an external link whose destination is the OOS start page, http://www.oos.org. Its really simple. You can use the href option here once again. You only have to set the value of href to the URL you want the link to point to. Example:
<a name="http://www.oos.org">Go to the OOS homepage;/a>

And here is the result:
Go to the OOS homepage
Please don't click on this link as you would leave the tutorial. You can still do this later when you're finished.


Finally, the last section of the tutorial. As you may have already discovered, you cannot use characters like "<" or ">" in a LML text as the browser would interpret it as the beginning of a tag. A quote (") or ampersand (&) can sometimes be complicated as well. There is a simple solution to this: if you need a less-than or greater-than, you can write a < as &lt;, a > as &gt;, a " as &quot; and write a & as &amp;.
Here is an example:
Less-Than: &lt;,
Greater-Than; &gt;,
Quote: &quot;,
Ampersand: &amp;

Result:
Less-Than: <, Greater-Than; >, Quote: ", Ampersand: &

This is the end of the LML tutorial. LML has some additional tags which will be listed in the tag summary below. Have fun with LML!

LML Tag Summary

Anchor (<a>)
Marks a text as a link or as a named section
Closing tag: required.
Options: href - Destination of the link
name - Name of the section

Break(<br>)
A line break.
Closing tag: optional.
Options: none

Citation(<cite>)
Marks a text which is a citation or reference.
Closing tag: required.
Options: none

Form(<form>)
Marks a form for use with CGI or similar systems.
Closing tag: required.
Options: method - "post" or "get", depending on the configuration of your CGI
action - the URL the result should be send to.

Headline(<h>)
Marks a text as a headline.
Closing tag: required.
Options: none

Input(<input>)
Displays a named button, text field, radiobutton or check box inside a form.
Closing tag: not allowed.
Options: type - "submit" for a button, "text" for a text field, "radio" for a radio button or "checkbox" for a checkbox.
name - The name of the input element
value - The label / title of the element

List item(<li>)
A list item in an unordered list.
Closing tag: not allowed.
Options: none

Paragraph(<p>)
Marks a text as a paragraph.
Closing tag: required.
Options: none

Strong(<strong>)
Marks a text which should have been emphasized.
Closing tag: required.
Options: none

Title(<title>)
Marks the title of the document.
Closing tag: required.
Options: none

Unordered list (<ul>)
Marks a section as an unordered list. Contains <li>-items.
Closing tag: required.
Options: none