Facebook Twitter

Alternative Style: Working With Alternat. So you’ve got a web page.

Alternative Style: Working With Alternat

You’ve marked it up with structural XHTML. You’ve also been a good little web developer and used style sheets to control what your document looks like. You’ve even gone the extra mile and created several alternative style sheets to show how hardcore you are. Great. But now you need a cross-browser way to dynamically switch between the style sheets. JavaScript Libraries. QuirksMode - for all your browser quirks. JavaScript Tutorial. Gecko DOM Reference.

The Document Object Model (DOM) is a programming interface for HTML and XML documents.

Gecko DOM Reference

It provides a structured representation of the document (a tree) and it defines a way that the structure can be accessed from programs so that they can change the document structure, style and content. The DOM provides a representation of the document as a structured group of nodes and objects that have properties and methods.

Essentially, it connects web pages to scripts or programming languages. Though often accessed using JavaScript, the DOM is not part of it and it can be used by other languages, though this is much less common. An introduction to the DOM is available. Ajax (programming) Ajax is not a single technology, but a group of technologies.

Ajax (programming)

HTML and CSS can be used in combination to mark up and style information. The DOM is accessed with JavaScript to dynamically display, and allow the user to interact with, the information presented. Ajax (programming)