Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / HTML

The search element — a search region

The `search` element identifies a search or filtering region. It gives structure meaning but does not perform searches itself.

Version: WHATWG HTML Living Standard; index snapshot date recorded separately

Syntax

<search>…</search>

The search element groups controls or other content related to searching or filtering a website, application, or current page. It is neither an input type="search" field nor a form; it can contain them but does not require a form.

It belongs to the flow content and palpable content categories and accepts flow content. Both tags are required. It supports global attributes and uses the HTMLElement interface.

Do not use it solely as a results container; a separate results page should present results in its main content. Search suggestions may appear inside. The element itself does not implement searching.

Examples

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Search example</title>
</head>
<body>
  <search>
    <label for="query">Find an article</label>
    <input id="query" type="search">
  </search>
</body>
</html>

Result

Find an article

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources