HTML and CSS Reference
HTML5 is, at the moment, the very definition of cutting-edge. Many of the features built
into the language are just barely being supported cross-browser. In this lesson, you explore
a few of the more tantalizing prospects in HTML5 and CSS3. Looking to add more print-
like typography to your sites? Check out the section on the new @font-face CSS property.
Need to develop sites for smart phones and tablets? Take advantage of the new media query
capabilities in the multiple screen section. Want to add dynamic imaging capabilities to your
repertoire? Be sure to read the section on using the HTML5 <canvas> tag. The best news
is that all three of these technologies are usable today and definitely prepare you to better
handle the future of the Web.
G FonT PossibiLiTies
Type has long been the bane of the web designer's existence — especially those designers who
came from the print world. In print, there is a veritable universe of choice when it comes to
typefaces. On the Web, designers have been restricted to a very small number of fonts com-
mon to the major computing platforms. Worse, you could never be sure exactly what font was
being displayed on the site visitor's screen because the CSS font-family property allowed for
a number of options.
Happily, using fonts on the Web just got a whole lot better with the @font-face CSS declara-
tion. The @font-face declaration is specified in the CSS3 working draft, but the benefit is so
needed that almost all major browsers have implemented it already (Firefox 3.5, Safari 3.2,
Opera 10.1, and Google Chrome 5.0) and the one holdout, Internet Explorer, has announced
plans to fully support it in the next release, version 9.0. Even better, Internet Explorer already
supports a variation of the specification and, with a little coding magic, @font-face can be
made to work in earlier browser versions as well.