If you're using a version of macOS older than 10.7 this option is.
Select Format on the menu bar and click Make Plain Text.
TextEdit which works with files in a rich text format by default must To change how the HTML file displays in the browser you change TextEdit to the plain text setting.