HTML <isindex> Element

The <isindex> element was an early HTML feature used to create a simple single-line text field for entering search terms or keywords. Unlike modern forms, much of its interface and submission behavior was supplied automatically by the browser.

Historical Syntax

Early HTML documents could contain markup similar to the following:

<isindex prompt="Search this site: ">

The browser generated a text-entry field and displayed the specified prompt. When the visitor entered search terms and submitted them, the browser constructed a request based on the document's URL. This code is shown for historical reference only and should not be used in modern HTML.

Attributes

The <isindex> element historically supported attributes associated with its simple search interface. These attributes are obsolete along with the element and are included here to help identify older HTML source code.

Attribute Description
action Specified the URL used when the entered information was submitted in implementations that supported the attribute.
prompt Specified the text displayed by the browser as a prompt for the input field.

Historical Use

The <isindex> element dates back to the earliest years of HTML, when the language had far fewer controls for collecting information from users. It provided a quick way for a document to indicate that the visitor could enter keywords, commonly for searching an index or collection of information.

Unlike a modern form, the author did not construct the interface from separate controls. The browser generated the input field and handled its special submission behavior. Entered words were historically encoded into the query portion of the requested URL.

As HTML forms developed, authors gained much greater control over input fields, labels, buttons, submission methods, and the destination that processed the submitted information.

Why It Became Obsolete

The <isindex> element provided only a very limited form of user input and relied on special browser-defined behavior. It could not provide the flexibility available through a normal HTML form and its collection of form controls.

The introduction and widespread use of the <form> and <input> elements made <isindex> unnecessary. Modern forms provide explicit structure, accessible labels, multiple controls, validation options, and predictable submission behavior.

The <isindex> element was deprecated in HTML 4.01 and is obsolete in modern HTML.

Modern Alternative

Use a normal HTML form when visitors need to enter and submit search terms. For a search interface, <input type="search"> clearly identifies the purpose of the field.

<form>
  <label for="site-search">Search this site:</label>
  <input type="search" id="site-search" name="q">
  <button type="button">Search</button>
</form>
Play in Editor

This modern approach gives the author direct control over the search field, its label, and the button. In a working search form, the <form> element can also specify how and where the search information is submitted.

Legacy Browser Support

The <isindex> element was supported by historical browsers, but support was removed from modern browser engines after the element had long been obsolete. Unlike several other obsolete HTML elements, <isindex> should not be expected to retain its historical input and submission behavior in current browsers.

Existing <isindex> markup should be replaced with a standard HTML form when older documents are updated.

Modern forms use the <form> element to contain controls, the <label> element to identify fields, the <input> element to collect information, and the <button> element to provide an explicit submission control.

Specifications

The <isindex> element is an obsolete, non-conforming feature in modern HTML and must not be used in new documents. Modern websites should use standard HTML forms and form controls for collecting and submitting user input.