Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

1. Hacking the Semantic Way > Hack 4. Bring Back the <input> Tag

Hack 4. Bring Back the <input> Tag

HTML5 has breathed new life into the <input> tag. It’s time to get excited once again about this “age-old” tag.

I have to admit that I was getting a little bored with the <input> tag. Before HTML5, any real interaction had to be done outside the tag: whether the interaction involved validation, formatting, or graphical presentation, JavaScript was a necessary polyfill. Well, HTML5 has given us a reason to be excited about the <input> tag again.

The <input> tag is not truly an HTML5 tag, per se. It’s the same <input> tag we have had in every previous version of HTML, but HTML5 has added a slew of new features. The good thing about updating an existing tag is that it’s naturally backward-compatible. You may code your tag like this:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint