Membuat Form dan Tombol sederhana dengan HTML



Ini coding untuk Form

<input TYPE="text" name="FirstName" value="Your FirstName here,Please" />
hasil nya seperti ini :
type=”text” the ‘type’ attribute tells the browser that a single line text input box should be created.
name=”FirstName” gives a name to the field. The name is used to identify the field on the server side.
There are some more attributes that you can use with the text box
value=”default value”
The text you give as value will be displayed by default in the text box.


 Buat tombol submit :
<input type="submit" name="submit" value="Submit" />

hasil nya seperti ini
name =”submit”
There can be more than one submit buttons in a form. On the server side, the submit button which was pressed can be identified using the ‘name’ attribute.

value=”Submit”
The string given in the ‘value’ attribute is displayed as the label of the Submit button.


gabungkan semua coding di atas
<html>
<body>
<form>
 First name: <input type="text" name="firstname" value="my name"/>
    <br />
    Last name:  <input type="text" name="lastname"/>
    
    <input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>

hasil :


First name: Last name:

SHARE IT →

0 komentar:

Posting Komentar

 
Dapatkan Update Terbaru!

Terima Kasih'Semoga Bermanfaat.