Professional Documents
Culture Documents
TEXT PROSEDURE
how to make a form in html
GURU PEMBIMBING :
PENYUSUN :
The form can be filled in, then processed with a specific program.
This tag has several attributes that must be provided, such as:
Example :
For the ‘action’ attribute, we can fill it with the URL address of the endpoint that will process the
form.
In simple terms,—in the example above—we will tell the ‘process.php’ file to process the form
data.
We will learn this later in PHP.
The HTML code above, will produce nothing
Because we haven't created the field yet.
what is field?
Fields are fields that can be filled with data.
Example fields:
z
- Open the application to create a program, here I use visual studio code, like the picture below
- if it's like that then we have to save this file, how ctrl+s
z
- after that it's up to you to put it in any folder and give it a name “form.html
Result :
Inside the <fieldset> tag, we create a <legend> tag to add text to the fieldset.
Next exercise, we will create a contact form. This form serves to contact or contact the admin.
Result :
z
In the example above, we provide type="email" for the email field, so that this field must be filled with
email only.
Just try to fill it with something else, then click Send…then a warning message will appear.
Result :
- radio fields;
- <select><option> fields;
- <textarea> field.
What is the difference between radio and checkbox?
But if we want visitors to choose more than one, then we use checkboxes.
Then for <select></option>, the nature is the same as radio. Only he looks different.
What we learned in this tutorial are the basic—and frequently used—tags and fields in form
creation.
There are many more field types that we haven't tried yet. Such as: meter, color, time, etc.