Plain Text
This following code demonstrates how to create an input element of type="text"
. Please notice the use of the <p>...</p>
element to display information text in front of the text box.
HTML
<p>
Net ID:
<input type="text" name="name" id="test-text" />
</p>
Please Enter:
Birth Year:
Net ID:
NOTE: Technically, you can omit the “type” from the input element if you want a text box. However, best practices suggest that one is explicit in their code to prevent errors.
- Previous
- Next