The command SEND HTML FILE does not cause an HTML file to be sent out at the moment the command is called. Rather, it is sent out automatically by 4D at the end of the execution chain. An alternative name for this command would be "SET WEB RESPONSE FILE". Examine the following:
SEND HTML FILE("TableTest.shtm")
If the "TableTest.shtm" document contained a 4DLOOP tag such as:
<!--4DLOOP [Table]--> : This kind of argument was not expected here.
You would expect that 4DLOOP would be executed for as many records as there are in [Table]. However, that is not the case. The file will only be parsed and sent at the end of the execution chain, so the 4DLOOP on [Table] would never execute, since there won't be any records in the selection of [Table] at the end of the execution chain.