Html tag

The Html tag is used to define the single-line text field on a web page. When we set the value text to the type attribute of an input element as shown in the following syntax:

Syntax:

Example

Html text tag

Output:

HTML Paragraph

Attributes of HTML Text Tag

1. Size

The size attribute is used to define the length of the text field. This attribute accepts the numeric values greater than zero. If you not specify this attribute, by default its value is 20. The following syntax determines how to use this attribute:

2. Value

The value attribute is used to define the value, which is displayed in the text field. The following syntax determines how to use this attribute:

3. maxlength

The maxlength attribute is used to define a value. This value identifies the maximum number of characters accept by the input. The following syntax determines how to use this attribute:

4. minlength

The maxlength attribute is used to define a value. This value identifies the minimum number of characters accept by the input. The following syntax determines how to use this attribute:

Browser Support

Element chrome browser Chrome ie browser IE firefox browser Firefox opera browser Opera safari browser Safari
Yes Yes Yes Yes Yes





Contact US

Email:[email protected]

HTML Text Tag
10/30