JavaScript by Example (2nd Edition)
Dynamic HTML, called DHTML, is really more than just a lively version of HTML. It consists of HTML4, the Document Object Model (DOM), JavaScript, and CSS (Cascading Style Sheets). CSS was introduced by the World Wide Web Consortium to help designers get more control over their Web pages by enhancing what HTML can do ”it is used to stylize the content of a Web page. CSS is to a Web page what a hair stylist is to your hair. You can get a simple haircut for $9 or you can go to a fancy salon and hire a stylist to give you a really cool new look. Plain HTML gives you the $9 Web page, and DHTML takes your page to the styling salon to give it a dramatic new appearance. Whereas HTML is concerned with the structure and organization of a document, CSS is concerned with its layout and presentation. Since the initial style of the content is done with CSS, we'll start there. After that we'll use the DOM and JavaScript to dynamically change the style of the page after it has been loaded. For a complete discussion of Cascading Style Sheets (both CSS1 and CSS2) see http://www.w3org/Style/CSS. |