How do you get the HTML code you want to edit? Do you export it from InDesign or do you import it? InDesign itself is not working with HTML.
It seriously sounds like you have a misconception about InDesign. It is not an HTML editor.
It is a page layout program for print, EPUB, PDF, or DPS. As a side effect, after creating the layout, if you choose to export to HTML, it makes an attempt to translate some of what it's creating into HTML. How well it does depends on how accurately and consistently you have applied paragraph, character, object, table and cell styles and whether you've using the Paragraph Styles panel to map styles to HTML tags.