Text Field In HTML

In this article I will tell you about Text Fields in HTML.
  • 2479

Introduction

In this article I will tell you about Text Fields in HTML. The Text Field in HTML are one line areas that allow the user to input text. You will notice that when you click in text field, the cursor will change from the typical arrow to a pipe character ( | ), allowing for text entries to be typed inside each input field.

Code create a text field in HTML page.

<form action="">
<input type="text" value="Your Name">
<input type="submit" value="submit">
</form>

Here, <form action> specifies the page to be displayed when you click on the Submit button, <input type> specifies the type of component is a text field.

HTML Text Field Code:

<!DOCTYPE html>

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

    <title> HTML TextField</title>

</head>

<body>

<h2>HTML TextField</h2>

<form name="myWebForm" action="http://www.dotnetheaven.com" method="post">

First:&nbsp&nbsp <input title="Please Enter Your First Name" id="first" name="first" type="text" value="Enter your First Name here!" /><br /> Last:&nbsp;&nbsp; <input title="Please Enter Your Last Name" id="last" name="last" type="text" value="Enter your Last Name here!" />&nbsp;

</form>

<p>

<input type="submit" value="SUBMIT" /></p>

</body>

</html>

 

Output:

 HTML_TextField.jpg

© 2019 DotNetHeaven. All rights reserved.