I strongly recommend avoiding opening any kind of markup in TextEdit (programming languages might be okay, though it's still a lousy tool for the job). It tries to display .html files as rich text, which implicitly turns the document into an RTF (silent conversion). If you then try to convert it to plain text, hoping it'll let you see the markup, you'll be disappointed to discover it just converts the RTF into plain text. At that point, if you decide to 'undo' that, the .rtf file will now silently replace your original .html file, which is now permanently destroyed. Hope you have a backup in Time Machine or elsewhere, because you're not getting it back through the built-in versioning system. (At least, this is how it works in Mountain Lion (10.8.1). I'm decribing the exact scenario I just went through when trying to use TextEdit to see older versions of a document, since BBEdit doesn't support Lion / Mountain Lion's versioning system.)
There is actually a setting that makes TextEdit usable for viewing HTML documents. In the preferences, under "Open and Save", make sure "Display HTML files as HTML code instead of formatted text" is checked. Once you've done that, the issue I just described won't occur. The problem is that it's off by default, which is why I feel it's safer to just avoid TextEdit altogether.