How Dynamic HTML Works


How Dynamic HTML Works

Dynamic HTML (DHTML) differs from traditional HTML in that it enables web page changes on-the-fly, after they've been downloaded. In plain HTML, after a page is downloaded, it is static and can be changed only when a user takes an action of some kind. But DHTML, for example, could cause an animation of a rocket to fly across your browser window several seconds after the page has been downloadedwithout you doing anything.



 


How XML Works

XML solves several major problems for web developers. Without it, to deliver web pages to different devices such as computers, cell phones, and wireless Palm devices, a developer must create and maintain three separate websites, with special coding for each deviceHTML for the computer, WAP for the cell phone, and what's called web clipping for the wireless Palm devices. It's an expensive, difficult, and time-consuming proposition. And even if a developer is building a site only for computers, every time the design changes, all the pages must be recodedagain, an expensive and time-consuming proposition.



Note

XML is the basis of one of the newest web technologies, Web Services, which allow programs and services to be delivered across the Internet using a web browser. For more information about Web Services, turn to Chapter 25. XML is also frequently used to allow applications, databases, and organizations to exchange information.



How AJAX Works

AJAX (Asynchronous JavaScript and XML) allows web developers to create interactive websites that function more like desktop programs than slow, static websites. Gmail and Google Maps are two examples of sites built using AJAX.



 


Chapter 20. How Hypertext Works

In the late 1960s, a computer scientist named Ted Nelson introduced hypertext, a concept that lays the foundation for the World Wide Web and its connections between documents, or pages.

Nelson wanted to create a new way of exploring information. He wanted to provide the reader with a spontaneous means of accessing more and more in-depth information about something that sparked the reader's interest when reading text on the page. Rather than reading a document from beginning to end, digesting the material in a sequential order, the reader could highlight a word and receive more information on the meaning of that word, for example.

Nelson imagined that you could read the United States Constitution, come across the term "electoral college," and then open another document that explains how the electoral college works. From that document, you might open another document that lists the votes of the electoral college from its founding to the present. From there, you might choose to open a document about former president William Jefferson Clinton, then another about the former First Cat, Socks, then another about the care and feeding of felines, and so forth. Ultimately, you could find a subject that wasn't even remotely connected to the Constitution, but which you would find interesting or entertaining.

This hypertext concept was obviously on Tim Berners-Lee's mind when he began thinking about how researchers could share their work across the Internet. He envisioned a system in which a document could be linked to other documents, enabling researchers to easily find more and related information simply by following a link from one document on the network to another.

Typically, hypertext consists of a hyperlink that appears onscreen as a highlighted word, icon, or graphic. By moving a mouse cursor over the item or object and clicking it, you easily navigate to additional information. On the Web, that information can be located at any other place on the Web, be it on the same host server or one across the globe. A linked object can be various media, such as text (linking from one character to a whole document, for example), a graphical button (such as direction arrows that move from page to page), or still images (photos, icons, or a comic strip), for example. The documents and objects that are being linked to can be on the same site as the original document or in an entirely different document.

Hypertext links are embedded into a web document using Hypertext Markup Language (HTML). A text link usually appears onscreen as an underlined word or phrase and is sometimes rendered in a different color from other text, depending on how your web browser interprets the HTML codes. When you place the mouse cursor on this underlined text and click the mouse button, you initiate a request by the browser for a new web page orif the text references an internal link to information in the same documentdirect your browser to scroll to another, specific point within the same document.

Images or icons can also act as hyperlinks. When you move the mouse cursor over the icon or graphic and click the mouse button, you launch the request to retrieve the linked information.