By default, it should work when you put HTML in “text” tab, then on front end you will get properly formatted structure and not the HTML code, it also depends on your theme which you are using, have you tried this issue with default wp theme(2012,2014 etc) ? is that same thing happening for default ?