Subscribe:

Ads 468x60px

dropdown

Social Icons

Showing posts with label HTML FORMS. Show all posts
Showing posts with label HTML FORMS. Show all posts

Complete codes for HTML-FORMS



--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

> Create Text Field


DEMO:

First name:
Last name:
Note: The form itself is not visible. Also note that the default width of a text field is 20 characters.


link: Get its code




--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

> Create Password Field


DEMO:


Username:
Password:
Note: The characters in a password field are masked (shown as asterisks or circles).


link: Get its code



--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

> Check Box


DEMO:


I have a bike
I have a car


link: Get its code



--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

> Radio Buttons


DEMO:


Male
Female
Note: When a user clicks on a radio-button, it becomes checked, and all other radio-buttons with equal name become unchecked.


link: Get its code



--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

>Simple Drop-Down Menu


DEMO:




link: Get its code



--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

> Drop-down List With A Pre-Selected List


DEMO:




link: Get its code



--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

> Text Area (a multiple line text input field)


DEMO:




link: Get its code



--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



Text Area (A multiple line text input field) - HTML FORMS

CODE: Text Area (A multiple line text input field)


<!DOCTYPE html>
<html>
<body>

<textarea rows="10" cols="30">
The cat was playing in the garden.
</textarea>

</body>
</html>



Back: HTML FORMS




Drop-Down List With A Pre-Selected Value - HTML FORMS

CODE: Drop-Down List With A Pre-Selected Value


<!DOCTYPE html>
<html>
<body>

<form action="">
<select name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat" selected>Fiat</option>
<option value="audi">Audi</option>
</select>
</form>

</body>
</html>




Back: HTML FORMS


Simple Drop-Down List - HTML FORMS

CODE: Simple Drop-Down List


<!DOCTYPE html>
<html>
<body>

<form action="">
<select name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat">Fiat</option>
<option value="audi">Audi</option>
</select>
</form>

</body>
</html>



Back: HTML FORMS


Radio Button - HTML FORMS

CODE: Radio Button


<!DOCTYPE html>
<html>
<body>
<form action="">
<input type="radio" name="sex" value="male">Male<br>
<input type="radio" name="sex" value="female">Female
</form>

<p><b>Note:</b> When a user clicks on a radio-button, it becomes checked, and all other radio-buttons with equal name become unchecked.</p>

</body>

</html>




Back: HTML FORMS


Check Box - HTML FORMS


CODE: Check Box


<!DOCTYPE html>
<html>
<body>
<form action="">
<input type="checkbox" name="vehicle" value="Bike">I have a bike<br>
<input type="checkbox" name="vehicle" value="Car">I have a car
</form>

</body>
</html>


Back: HTML FORMS

Create Password Field - HTML FORMS


CODE: Create Password Field



<!DOCTYPE html>
<html>
<body>
<form action="">
Username: <input type="text" name="user"><br>
Password: <input type="password" name="password">
</form>

<p><b>Note:</b> The characters in a password field are masked (shown as asterisks or circles).</p>

</body>


</html>


Back: HTML FORMS

Create Text Field - HTML FORMS


CODE: Create Text Field


<!DOCTYPE html>
<html>
<body>

<form action="">
First name: <input type="text" name="firstname"><br>
Last name: <input type="text" name="lastname">
</form>

<p><b>Note:</b> The form itself is not visible. Also note that the default width of a text field is 20 characters.</p>

</body>
</html>


Back: HTML FORMS