Text Field In HTML

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


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">

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">


    <title> HTML TextField</title>



<h2>HTML TextField</h2>

<form name="myWebForm" action="https://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;



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






© 2020 DotNetHeaven. All rights reserved.