views:

41

answers:

1

What is the best accessible and W3C HTML 4.01 strict valid way to code a one simple search input box with image button(to do search)?

like this

alt text

accessible and W3C HTML 4.01 strict valid both.

+3  A: 

<span class="search"><input type="text" ...><input type="image" ...></span> Where those are the only non-hidden inputs in the form (to get the submit-on-enter behavior).

.search{border:1px solid silver; display:inline-block;} .search input{border:0; background:transparent;} ... give or take (-moz-)border-radius and background on .search.

Anonymous