The browse, form and page procedures all let you embed your own HTML. The NetWebSource procedure is also a good place to put your own custom HTML, but there are some rules worth pointing out.
When "bits" of pages are sent asynchronously the HTML you create is validated according to XML rules. In effect, this means you shouldn't write HTML, you should write XHTML.
The main difference between the two is that XHTML is more rigid, and less forgiving. And the most common manifestation of this is the issue of closing tags.
In HTML you can code an image like this
<img src="bob.gif">
And you'd be fine. But in XML this leaves an unclosed tag (<img>). So in XHTML you need to close the tag, like this
<img src="bob.gif" />
or like this
<img src="bob.gif"></img>
Other common HTML tags used in isolation are <br> and <p>.
There are cases where HTML will suffice, but it never hurts to use valid XHTML.
The main indicator that you've done something wrong is that the page will display correctly when first loaded, but will refuse to "refresh" when it is dynamically updated.