HTML rel="search"

A rel="search" attribute value specifies that the linked page can be used to search relevant content in the current page.

Example

#

A rel="search" on an <a> element.
This link is a Google search query with a filter for the current site.

To discover more: .
To discover more:
 <a rel="search" href="https://google.com/search?q=site:dofactory.com" 
    target="_blank">Search here</a>.

Using rel="search"

The rel attribute defines the relationship between the current page and the linked page.

The rel="search" value specifies that the linked page is designed to search the current page for related content, resources, and more.


Syntax

<tagname rel="search" />

Elements that accept rel="search"

These elements accept the search value on the rel attribute.

Elements Description
<a> Specifies an anchor link -- see example above
<area> Creates clickable areas inside an image map.
<form> Specifies an HTML form.
<link> Links a resource to the current page

Browser support

Here is when rel support started for each browser:

Chrome
6.0 Sep 2010
Firefox
4.0 Mar 2011
IE/Edge
12.0 Jul 2015
Opera
11.1 Mar 2011
Safari
5.0 Jun 2010

You may also like

Guides