Live demo

Change the code of tag definition (left side) freely, then you’ll see the result.

How to use this tag?

You can mount this tag on HTML easily. Save the source above as sample.tag, and also create index.html:

    <title>Hello Riot.</title>
    <!-- place the custom tag anywhere inside the body -->
    <!-- include the tag -->
    <script type="riot/tag" src="sample.tag"></script>
    <!-- include riot.js -->
    <script src=""></script>
    <!-- mount the tag -->

That’s it!

Further reading