JSFiddle - React, Tailwind, and code Playground

by Brian Dukes

HTML

<h1>Testing <code>&lt;input type="search" /&gt;</code></h1>
<ul>
    <li><h2><code>&lt;input type="search" /></code></h2><input type="search" /></li>
    <li><h2><code>&lt;input type="search" value="abc" /></code></h2><input type="search" value="abc" /></li>    
    <li><h2><code>&lt;input type="search" results="5" autosave="a" /></code></h2><input type="search"  results="5" autosave="a" /></li>
</ul>
<p id="typeCheckResult"></p>

CSS

p.search {background:green;background: rgba(0,255,0,0.3);}
p.text {background:red;background: rgba(255,0,0,0.3);}

JavaScript

jQuery(function ($) {
    var type = $('input')[0].type;
    $('#typeCheckResult').text('Type is ' + type).addClass(type);
});