DEV Community

Share Point Anchor
Share Point Anchor

Posted on • Originally published at sharepointanchor.com on

HTML <isindex> IsIndex Tag

In HTML, the IsIndex tag is used to display the search string in the current document. It provides a single-line text input on a page to query a document. This tag uses the “prompt” and “action” attributes.

Note : The tag is deprecated in HTML , and it is not available in HTML 5.

The tag can be placed anywhere in the HTML document, but it is recommended to integrate it within the element. This tag is mainly used to search for any specific word in a long article but it is no more useful these days.

Info : Nowadays all the browsers contain the search feature by pressing the + keys, it will let you search the word.

Estimated reading time: 3 minutes

Syntax:

The tag does not contain the closing tag in HTML. But in XHTML it consists of both the starting tag and the ending tag.


<isindex prompt=" " action=" ">

Enter fullscreen mode Exit fullscreen mode

Sample of the HTML Tag:


<!DOCTYPE html>
<html>
  <head>
    <isindex prompt="Search your document">
  </head>
</html>

Enter fullscreen mode Exit fullscreen mode

Result:

All major browsers have now removed the tag , so avoid using it.

💡 Tips : You can use the tag with the tag, to define a single line input field that executes the same function of the tag.

Example:

Here is the sample for creating a search box by using the and tags with the element.


<!DOCTYPE html>
<html>
  <head>
    <form action="/search">
  <hr>
  <label>
    Search Document
    <input name="isindex">
  </label>
  <hr>
</form>
  </head>
<body>
<h2>This is the sample heading</h2>
<p>This is the sample paragraph</p>
</body>
</html>

Enter fullscreen mode Exit fullscreen mode

Result:

Result

Attributes:

The HTML IsIndex tag supports the Global Attributes and the Event Attributes.

th, td{ padding: 20px; }

Attribute Value Description
prompt hint-text It is used to specify 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.
action URL It defines the URL programs , which perform the search.

Browser Support:

Browser support

Related Articles:

The post HTML IsIndex Tag appeared first on Share Point Anchor.

Top comments (0)