Right, because it's a wysiwyg editor. You can only enter that in html edit mode but that's not enabled here.
the [ code ] method is probably the only way as that it using the <pre> or other methods to prevent whitespace removals.
the white space removal is there so that you can have some structure in your html to make it easier to follow (like the auto indent/format in B4X)
without adding the spacing gaps in front of your texts/objects.