Create HTML Code
Author: Carl Sassenrath
Here is a very handy way to generate HTML code that we use a lot at REBOL Technologies. It is quick to write and quick to run.
First, copy these two lines:
Now, you can write HTML code easily within REBOL. You can write either a single tag, a string, a block, or any other value.
The result is found in the HTML variable. To see it:
You will notice that it contains no extra spaces or line breaks that might mess up your HTML formatting.
To save the result to an HTML file:
Here is an actual example from one of our web scripts that generates an HTML table:
The most important thing to notice is that normal text must be put in quotes (otherwise REBOL will think it's code and try to evaluate it.)
To use this method to create multiple HTML files, you can clear the output string with the line:
then, start processing the next file.