HTML and CSS Reference
KNOWING WHEN YOU NEED A SCRIPT
h e more you use HTML5, the more you need a script to get the most out of your Web pages.
and can work in small snippets — even non-developers can do it.
the tag format:
HTML5 code ( ScriptTag.html in this chapter's folder at www.wiley.com/go/
<! DOCTYPE HTML >
< html >
< head >
< meta http - equiv = ”Content-Type” content = ”text/html; charset=UTF-8” >
</ head >
< body >
A regular Web page ....
</ body >
</ html >
When you test that little program, you'll see an alert box pop up (shown in Figure 5-2).
loads. h at's because everything in the head container loads i rst. If you have a more elaborate
in Safari on an iPhone; you can clearly see that the Web page associated with the HTML5
code has not loaded.