Writing JavaScript-Friendly HTML

Because you’ll be using JavaScript to manipulate the objects within a document, you want to write your HTML in a way that can be easily used by your scripts. That basically means writing modern, standards-compliant XHTML and using CSS to separate the document’s structure from its presentation.

When we say modern XHTML, we don’t just mean documents that pass W3C validation using the Web tool at validator.w3.org. We also recommend thinking ahead to what you are likely to do with a page and adding appropriate tags and attributes that will make it easy to access objects with JavaScript. What sort of markup, you wonder? Glad you asked.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.33.243