HTML and CSS Reference
In-Depth Information
Figure 1-32
Web page as it appears in Internet Explorer 8
Dave needs this problem fi xed because he can't assume that users will always be running
the latest version of Internet Explorer. Workarounds for this problem involve running an
external program known as a script . The most often used program language for the Web is
JavaScript . Like HTML and CSS fi les, JavaScript fi les are text fi les that require no special soft-
ware other than a Web browser to run. At this point, you don't need to know how to write a
JavaScript program to correct Internet Explorer's problem with HTML5 elements; someone
else has already done that. You just need to know how to access and run their program.
One of the most useful programs to enable HTML5 support in older browsers is
Modernizr. Modernizr is a free, open-source, MIT-licensed JavaScript library of func-
tions that provides support for many HTML5 elements and for the newest CSS styles.
One of the many uses of Modernizr is to enable support for HTML5 in older browsers.
Modernizr is distributed in a single JavaScript fi le that you can download from www. an d add to your Web site. To link a Web page to a JavaScript fi le, you
add the script element
<script src=” file ”></script>
to the document head, where file is the name of the JavaScript fi le. The current version
of Modernizr at the time of this writing is stored in the fi le modernizr-1.5.js . To link to
this fi le, you add the following to the document head:
<script src=”modernizr-1.5.js”></script>
The modernizr-1.5.js fi le has already been added to your data folder. Link to this fi le
now to apply it to Dave's Web page.
Search WWH ::

Custom Search