Mendix Email Template editor is a WYSIWYG (What-You-See-Is-What-You-Get) editor. You should'nt write HTML code in that editor directly but can write the text and format with the available buttons in the editor.
Additionally, if you really need to use your own HTML code, you can press the view code button (which I highlighted below) and then paste your HTML code inside the popup modal window.