Chapter 2JavaScript and CSS in HTML5 Web Development

HTML is the basic web page language, but on its own, it does nothing much more than lay out items on the page. It does not offer any inherent power to process routines or crunch numbers. HTML does not loop (meaning you can’t create a reusable HTML code snippet). HTML structures the page. That is its role. The rest is up to other technologies.

JavaScript adds the punch to the page. Quite powerful, JavaScript can do many things, from move an item on the page to sophisticated calculations. With its conditional statements (if, for, switch, and so on), JavaScript can be coded to make decisions and branch out in a specific area of processing based on other variables.

CSS, like HTML, is not a language ...

Get HTML5 Multimedia Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.