Is there an application divided into two areas, one area for html code input and the other for previewing the inserted code? That application would be used for better understanding of html syntax etc.
Hmm... Wouldn't that be an essential part of web design software, to view/edit your site, and preview the updates that you might make to the site, prior to publishing?
I looked at a handful of web design apps, and preview seems a normal component. https://espressoapp.com/
The developer tools in modern browsers will let you view/edit the HTML/CSS of pages and preview in real-time. Should work fine if the goal is to simply improve understanding of HTML/CSS.
W3 Schools has some resources like that. Their main pages function as a lexicon for various coding systems common on the web, including HTML. They have demo pages for each tag that demo the tags function and allow you to edit the code in one frame and see the result in another. It is not for developing complete pages/site, but is targeted for learning.