You will be familiar with HyperText Markup Language (HTML), the lingua franca of the Web, but perhaps not so familiar with its successor, eXtensible HyperText Markup Language (XHTML). XHTML is
the more exacting version of HTML. In fact, it is the HTML standard specified as an XML document. The main difference with this is that whereas HTML has been fairly easygoing and the browser will make a
reasonable attempt to display anything you place in tags, XHTML now follows XML’s rules. For example, XML documents must be well ormed (tags are correctly opened and closed, and nested), and so must XHTML pages. For example, the following is correct nesting:

<div>
<h1>
This is a correctly nested H1 tag
</h1>
</div>


The following is incorrect nesting:

<div>
<h1>
This is an incorrectly nested H1 tag
</div>
</h1>


Although it might seem to go against the grain of HTML’s easygoing and easy-to-code nature, if a page isn’t correctly constructed, then you won’t be able to perform the kind of Ajax techniques discussed in this book. To use the DOM, the page has to be correctly formed. Otherwise, you won’t be able to access
the different parts of the page.

Cascading Style Sheets (CSS) are the templates behind HTML pages that describe the presentation and layout of the text and data contained within an HTML page. CSS is of particular interest to the developer because changes made to the style sheet are instantly reflected in the display of the page. The style sheets are linked into the document commonly with the HTML <link> tag, although it is possible (but not preferable) to specify style attributes for each individual HTML tag on a page. You can also access CSS properties via the DOM.

In the design of any web site or web application, you should make the division between the content/structure of the page and the presentation as clear as possible. Suppose you have 100 pages and you specify the font size on all 100 pages as a style attribute. When you’re forced to change the font size you will have to change it on each individual page, instead of changing it just once in the style sheet.

Having a style sheet isn’t 100 percent essential, but to keep good organization, style sheets are an indispensable aid.





<click here for link> | <click here for link> | <click here for link> |<click here for link> | <click here for link>

-- edited by beingchinmay on Aug 04 2015, 07:05 PM