You can't add names to divs - names are only valid on form fields and are what the server side processing uses as the field names for the data that is passed to it.
document.write and document.writeln went out of use at the same time since innerHTML is able to update the page after it finishes loading .
form the HTML and add
You can't submit a form to email using mailto: as modern browsers don't allow it - they will simply open the email program instead and ignore what was filled out in the form. You should use a form2mail script on the server instead to send the form to an email.