I tried this:
$('<input class="inputName" type="text" />').appendTo($('body'))
but it turns out
<body><input class="inputName" type="text"></body>
Is there a way to creat the proper self-closing label?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you are doing is in fact correct.
Ensure your DOCTYPE is XHTML.
Edit: You don’t have to worry about any of this since the code won’t pass through validators anyway (validators do not execute javascript).