HTML5 was a real big improvement in the webdevelopment. We don’t need ugly JS hacks anymore for the simplest stuff. We can use the built-in functions of the webbrowsers instead. Anybody who didn’t check the new tags and attributes what the new standard provides I highly recommend to do it. Why?
Let me show an example:
Input type=”search”
( http://www.w3.org/TR/html-markup/input.search.html )
Everybody who saw this new input type could read that this doesn’t provide any extra feature only give a little hint to the browser that the value typed in will be used for some kind of a search on the site. But that’s exactly why it’s interesting. The share of Google Chrome is increasing fast and in 2012 March it has became the most popular webbrowser ( http://www.w3schools.com/browsers/browsers_stats.asp ). So let’s have a look what it can do with our search box.
This is a piece from the source of http://booking.com :
1 |
<input class="text wide ui-autocomplete-input" type="search" results="9" autosave="booking.com" style="margin-bottom:0px; " autocomplete="off" placeholder="pl. város, régió, kerület vagy egy bizonyos szálláshely" id="destination" name="ss" title="pl. város, régió, kerület vagy egy bizonyos szálláshely" role="textbox" aria-autocomplete="list" aria-haspopup="true"> |
This turns to a nice search box in the url bar in Google Chrome when you type “booking.com “ (booking.com and hit space).
Pretty cool, isn’t it?
Recent comments