HTML_8_Form

Form

The <form> tag is used to create an HTML form for user input.

The <form> element can contain one or more of the following form elements:

<input>

<textarea>

<button>

<select>

<option>

<optgroup>

<fieldset>

<legend>

<label>


<form>

    <fieldset>
        <legend>Sing In</legend>

<label>Username:</label>
<input type="text" name="username" placeholder="Enter your name" size="30" maxlength="2
<br>
<label>Password:</label>
<input type="password" placeholder="*******" size="10" maxlength="16">
<br>
<label>Message:</label>
<textarea cols="30" rows="10">Message</textarea>

<h2>Selection</h2>
<input type="radio" name="gen" value="Male">Male
<input type="radio" name="gen" value="Female">Female
<br>
<input type="checkbox" name="fruit" value="apple">Apple
<input type="checkbox" name="fruit" value="orange">Orange
<input type="checkbox" name="fruit" value="mango">Mango
<br>
<select>
    <option value="apple">Apple</option>
    <option value="mango">Mango</option>
    <option value="lime">Lime</option>
    <option value="durin">Durin</option>
</select>

<select size="2">
    <option value="apple">Apple</option>
    <option value="mango">Mango</option>
    <option value="lime">Lime</option>
    <option value="durin">Durin</option>
</select>
<select size="4" multiple>
    <option value="apple">Apple</option>
    <option value="mango">Mango</option>
    <option value="lime">Lime</option>
    <option value="durin">Durin</option>
</select>
<br>    <hr>    <br>
    <h2>Button</h2>
    <input type="file">
    <input type="image" src="pooh.gif">
    <input type="date">
    <input type="color">
    <br>
    Email:<input type="email">
    <br>
    URL:<input type="url">
    <input type="submit" name="btn_send" value="Send">
</fieldset>

</form>



Comments

Popular posts from this blog

HTML_1_Introduction

HTML_6_Media

HTML_7_Link