Create an input with type search and add the following CSS rule:
search
input[type='search']::-webkit-search-cancel-button { -webkit-appearance: searchfield-cancel-button; }