<isindex>

HTML <isindex> Tag

The <isindex> tag is used to display search strings in the current document. The tag is placed inside the <head> element.

The <isindex> is a deprecated HTML tag and not supported correctly by browsers. To define a single line input field, you need to use the <input> tag with the <label> tag, which executes the same function as the prompt attribute.

The <isindex> tag wasn’t implemented steadily across browsers in previous versions of HTML, and it has been obsolete since then. When you put the element into <head>, the browser would understand it as an action to provide a search function for a document. But today each document is searchable since browsers have a Find feature.

Syntax

Syntax (语法)

The <isindex> tag is empty, which means that the closing tag isn’t required. But in XHTML, the (<isindex>) tag must be closed (<isindex/>).

Example of the HTML <isindex> tag:

<!DOCTYPE html>
<html>
 <head>
   <isindex prompt="Search a text" />
 </head>
</html>

Attributes

Attributes (属性)

AttributeValueDescription
prompthint-textSpecifies the text string that is displayed in front of the search query input field. If this attribute is not specified, the default browser will display its own text.
actionURLSpecifies URL programs, which perform the search.

The <isindex> tag supports the Global Attributes and the Event Attributes.



请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部