I usually don't remember the syntax for HTML forms. Inevitably, when I'm starting a project, I need to go look up the basics. Then, I usually reuse the template that I come up with and don't look back. Here are some notes on those basics...

There is a python module, webhelpers, that will help in generating form markup:

This also turns out to be a good reference for common html tags, even if you don't want to generate them: