It works OK for me in a HTML Resource, no problems. I switched to source mode in the editor, pasted it in and saved it.
It will not work in an area like forums where students have access, because the code is stripped of forms and things for security reasons.
Text editors
Help! Valid HTML (attached) mangled by editor
Энэ мэтгэлцээн түгжигдсэн тул та цаашид хариулт өгөх боломжгүй