<p>I want the search box on my web page to display the word "Search" in gray italics. When the box receives focus, it should look just like an empty text box. If there is already text in it, it should display the text normally (black, non-italics). This will help me avoid clutter by removing the label.</p>

<p>BTW, this is an on-page <a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29" rel="noreferrer">Ajax</a> search, so it has no button.</p>

You can add and remove a special CSS class and modify the input value
```
onfocus
```
/
```
onblur
```
with JavaScript:
```
```
<input type="text" class="hint" value="Search..."
    onfocus="if (this.className=='hint') { this.className = ''; this.value = ''; }"
    onblur="if (this.value == '') { this.className = 'hint'; this.value = 'Search...'; }">
```
```
Then specify a
hint
class with the styling you want in your CSS for example:
```
```
input.hint {
    color: grey;
}
```
```