Spiegato, Home

Technology and Gadgets

What is an Input Tag?

  • Published by Spiegato
  • 2 min read

A tag is a formatting code that is part of a document language, also known as a markup language, used to annotate a text in a way that is distinct from the text and provides instructions for how the text is to be displayed. There are various markup systems that have a large number of unique tags. The markup systems or languages include TeX, Scribe, GML, SGML, HTML, XML, and XHTML. HTML stands for HyperText Markup Language and it is used in the World Wide Web to create structure for text and documents and to create hyperlinks between documents, while XHTML (extensible HTML) combines HTML and XML. The input tag is an HTML and XHTML tag, and it is supported by Microsoft® Internet Explorer®, Mozilla® Firefox®, Opera®, Google® Chrome®, and Apple® Safari® browsers.

Many HTML and XHTML tags serve to format text that is on the page, but some create opportunities for user interaction, and the input tag is one of the latter: it is a key player in building forms. There is an important difference between how the input tag is used in HTML and how it is used in XHTML, however. In HTML the tag is used, with the ellipses replaced by whatever content the tag holds, and has no end tag. In XHTML, the input tag requires a proper closing like this .

The input tag must include the type attribute to specify the type of control field to be used. The possibilities are: button, checkbox, file, hidden, image, password, radio, reset, submit, and text. The button type usually has an action programmed with a client side script, such as JavaScript®, while the checkbox and radio buttons toggle on and off when clicked. The file type allows the user to upload a file, while hidden values are not displayed but stay attached to the form entry. Password differs from text in that it often has dots or asterisks to mask the characters that are entered, and submit, image — which is a kind of submit button — and reset are global treatments of form data.

Key terms in this article

Related articles

  • What are Audio Input Devices?

    Audio input devices allow a user to send audio signals to a computer for processing, recording, or carrying out commands. Devices such as microphones…

  • What Is an Input Method?

    An input method is a tool in either an operating system or a software program that enables the user of a computing device to use the keyboard to type…

  • What is an Input Mask?

    An input mask is an expression that helps to define what type of contact is allowed in a given field on a template. The idea behind the input mask is to…

  • What Are the Best Tips for HTML Form Input?

    Hyper Text Markup Language (HTML) form input is a way to get information manually entered into a web page. If a website designer wants to give the user…

  • What is an RFID Tag?

    Radio Frequency Identification (RFID) Technology uses small electronic tags as wireless identification devices. Passive RFID tags require no standard…