Here's something extremely crude that will get you started:
string myHtml = ...
int textlLength = Regex.Replace(myHtml, "<[^>]*>", String.Empty).Length;
double textToHtmlRatio = (double)textlLength / (double)(myHtml.Length);
Nete that the regex used to strip out HTML is extremely rough. You really need to use a parser to be accurate, and at the very least you need to handle encoded characters (eg
&
etc)