Scenario

In this example we use the simple YUI module. There are two modes.
Mode 1 embeds the html in the page and then creates a module out of it in the script.
Mode 2 creates the module from scratch in the script.
In both cases, the YUI library hooks into the header, body, and footer allowing you to style them and access them through methods.
In the case of the static page, you indicate what each area is with a class.

When the Module is created, the library does a simple loop through the child nodes of the module to find it. It expects them to be at the top level.

Mode #1 from Markup
This is a Module that was marked up in the document.
End of Mode #1