Zulu
Zulu
Documentation
Tutorials.Hello World

The proverbial "Hello World" program in XUL looks like this:


<?xml version="1.0"?>
<window>
    <description>Hello World!</description>
</window>

And here is how Zulu renders it:

The <window> tag is required by the XUL specification to be the root element of the XML document. Zulu Web Edition layout being represented as a single document interface (SDI), simply doesn't render this tag.

As you can see, Zulu placed the description at the location (0, 0). To specify the position of an element, either CSS1 or the absolute positioning extension mechanism provided by Zulu can be used. Here is an example using the later approach:


<?xml version="1.0"?>
<window>
    <description x="100" y="100">Hello World!</description>
</window>

And the result:

The text displayed by the <description> tag can contain simple HTML formatting as shown in the following example:


<?xml version="1.0"?>
<window>
    <description x="100" y="100">
        <font size="20" color="#ff0000">
            <b><i>Hello World!</i></b>
        </font>
    </description>
</window>

The complete attribute list of the <description> tag can be found here

1 The implementation of the CSS specification is still under development in the current alpha release