Skip to Content
Learning JavaScript
book

Learning JavaScript

by Shelley Powers
October 2006
Beginner to intermediate
352 pages
9h 33m
English
O'Reilly Media, Inc.
Content preview from Learning JavaScript

Chapter 12. Building Dynamic Web Pages: Adding Style to Your Script

Back in 1996, I was invited to a confidential author introduction for a new technology that Microsoft planned to roll out within the year. I traveled up from Portland, Oregon to Microsoft’s Seattle campus and joined with several other authors and editors from various book companies in a rather nice conference room (with a kicker buffet in the back).

One of the Microsoft managers appeared in front of a projected image of a web page, which wasn’t anything to write home about. That is, until he clicked on a header in the page, and the material below the header was pushed down as a previously hidden paragraph. A small thing, and no big thing now, but back then, I was blown away.

This was my first introduction to the concept that became known as Dynamic HTML or DHTML. I eventually went on to write a book on DHTML, as well as several articles dealing with cross-browser DHTML. The key element to the concept was the introduction of a new W3C specification, Cascading Style Sheets, in addition to the concept of Document Object Model, though there was no universal model at the time.

It’s through CSS that we can define the appearance of page elements without having to rely on external applications, plug-ins, or excessive use of images. It’s also through CSS and stylesheets that we can separate the presentation of page elements from their organization.

However, it was through the DOM that we could access stylesheet properties from ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Learning JavaScript, 2nd Edition

Learning JavaScript, 2nd Edition

Shelley Powers

Publisher Resources

ISBN: 0596527462Catalog PageErrata