Javatpoint Logo
Javatpoint Logo

Html <text> tag

The Html <text> 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

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<text>YesYesYesYesYes






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA