1 2. Outside the body
conzer12 edited this page 2024-12-06 06:32:11 +00:00

Say you would want something like a footer. Tags outside an element are ignored. You must create a custom element for them.

<hylia>
    <element name="body">
        I am in the body element.
    </element>
    <p>I am not in the body element.</p>
    <element name="outside">
        I am outside the body element, but inside the outside element.
    </element>
</hylia>

See how we created an "outside" element? The text inside it will be placed outside the body element, in our output html:

<!DOCTYPE html>
<html>
<body>
I am in the body element.
</body>
I am outside the body element, but inside the outside element.
</html>

Therefore, you could create a footer element and have <footer>I'm a little footer, short and stout</footer> and it would act as a footer when it's compiled.