Can you please help me with the HTML/JavaScript syntax of this problem:

Make a registration page. Create a form for the username, password and secret answer to a question. Filling the necessary info, the user may click the "create account" button. Clicking so will produce an alert box.
If the forms were successfully filled, the popup box will contain: "You have successfully created an account".
If there is an error in any of the forms, the popup box will contain: "Sorry, you're account cannot be created."

Thank you!!! ^_^