Search This Blog

Monday, 3 November 2014

HTML, DHTML, and XHTML

In developing the World Wide Web, Tim Berners-Lee (see Berners-Lee, Tim) had to provide several basic facilities. One was a protocol, HTTP, for requesting documents over the network (see world wide web). Another was a system of links between documents (see hypertext and hyper-media). The third was a way to embed instructions in the pages so that the Web browser could properly display the text and graphics. Berners-Lee created HTML (Hypertext Markup Language) for this purpose. It is based on the more elaborate SGML (Standard Generalized Markup Language).

The basic “statement” in HTML is the tag. Tags are delimited by angle brackets (<>). Tags that affect a docu-ment or section of a document come in pairs, with the sec-ond member of the pair preceded by a slash. For example, the tags

<HTML>

</HTML>

indicate the beginning and end of an HTML document, while <BOLD> and </BOLD> delimit text that should be rendered in boldface.

Besides specifying such things as headings, font, font size, and typestyles, HTML includes tags for Web-related functions. One of the most useful is the A, or “anchor” tag. As with some other HTML tags, the A tag is used with attributes that further specify what it so be done. The A tag is usually used with the <HREF> or Hypertext Reference attribute, which specifies a document that is to be linked to the current document so that the user can click on a high-light to go there. For example:

<A HREF=“http://www.MySite.Pages/

Glossary”>Glossary of Computer Terms</A>

specifies a link to a particular page at a particular site. The link will appear in the browser as the highlighted text Glossary of Computer Terms. If clicked, the browser will load the HTML page titled Glossary.

Implementation and Extensions

Inserting HTML tags by hand is a tedious and error-prone process (for example, it’s easy to omit a bracket or a slash or add “illegal” spaces within tags). Fortunately, there are now many HTML editor programs that let users insert the appropriate elements much in the way word processors make it easy to specify fonts and formatting. (Indeed, pro-grams such as Microsoft Word allow users to convert and save documents in HTML format.)

HTML has been extended in a number of ways. First, new features have been added to later versions of the language, including better support for frames, columns, tables, and other formats. Browser developers have also adopted a system that allows document authors to define general styles to ensure consistent document appearance (see cas-cading style sheets). Style sheets can inherit styles from other style sheets, allowing an organization to create gen-eral style sheets that can then be refined to create special-ized styles for particular types of documents. The latest version of HTML (as of 2007) is 4.01, with 5.0 still in draft.

Dynamic HTML (DHTML) is a set of techniques that allow otherwise fixed (“static”) HTML pages to be changed as users are viewing them. A scripting language (see, for example, JavaScript) is used to change the specifications (usually via the style sheet). The programming interface to the Web page is the document object model (see dom). DHTML can be used, for example, to create drop-down menus or “rollover” buttons that change as the mouse navi-gates over them. Even simple games have been written in DHTML to run in Web browsers. DHTML should be distin-guished from other dynamic techniques such as server-side scripting (see Perl and php), which changes the page before it is presented to the user, and asynchronous techniques that can change a part of a page without reloading it (see Ajax).

XHTML is essentially a rewriting of HTML according to the syntax of the Extensible HyperText Markup Language (see xml). Because of the stricter syntax rules for XML, XHTML cannot use many of the earlier free-form structures of HTML. However, because XML has become so prevalent a means for connecting Web pages to data sources, there are many XmL tools that XHTML authors can use for parsing and syntax checking. As of 2007, XHTML 1.1 is the prevail-ing standard, but a draft 2.0 version represents a more thor-ough break from the elements of the original HTML.

No comments:

Post a Comment