HTML and CSS Reference
In-Depth Information
< meta http-equiv = ”Content-Type” content = ”text/html; charset=UTF-8” >
< title > Datalist </ title >
</ head >
< body >
< p >
< label > Which of the following would you like to learn? < br />
< input type = ”text” name = ”web” list= ”lang” >
< datalist id = ”lang” >
< option value = ”HTML5” >
< option value = ”JavaScript” >
< option value = ”jQuery” >
< option value = ”ActionScript 3.0” >
< option value = ”Java” >
</ datalist >
</ label >
< br />
</ p >
</ body >
</ html >
When you open the i le in an Opera browser, you'll be given a list of input options, as shown
in Figure 1-2.
11
Figure 1-2: Using the <datalist> tag in an Opera browser.
Unlike earlier versions of HTML, in which text input didn't show the user an options list, this
one does.
USING CONTINUED TAGS FROM HTML4
Even if you're familiar with HTML4 (or earlier versions of HTML), you'll be surprised by the
number of HTML elements you may not know how to use or may not have even heard of
before. For example, what's the <q> tag? When is it used? If you're new to HTML, don't try to
remember all of the elements in Table 1.2, but go over them to get a general sense of the
available tags and a little about their description.
 
Search WWH ::




Custom Search