Monday, September 23, 2013

DHTML Basics



What is DHTML

lDHTML is the art of making HTML pages dynamic!
lDHTML is a combination of technologies used to create dynamic and interactive Web sites.
lTo most people DHTML means a combination of HTML, Style Sheets and JavaScript.

Features
lChanging the tags and properties
lReal-time positioning
lDynamic fonts (Netscape Communicator)
lData binding (Internet Explorer)

Changing the tags and properties
lThis is one of the most common uses of DHTML. It allows you to change the qualities of an HTML tag depending on an event outside of the browser (such as a mouse click, time, or date, and so on). You can use this to preload information onto a page, and not display it unless the reader clicks on a specific link.

Real-time postioning
lWhen most people think of DHTML this is what they expect. Objects, images, and text moving around the Web page. This can allow you to play interactive games with your readers or animate portions of your screen.

Dynamic Fonts
lThis is a Netscape only feature. Netscape developed this to get around the problem designers had with not knowing what fonts would be on a reader's system. With dynamic fonts, the fonts are encoded and downloaded with the page, so that the page always looks how the designer intended it to.
Data binding
lThis is an IE only feature. Microsoft developed this to allow easier access to databases from Web sites. It is very similar to using a CGI to access a database, but uses an ActiveX control to function. This feature is very advanced and difficult to use for the beginning DHTML writer.
Advantages of DHTML
l1. Fast and Zippy: - dHTML loads content on fly. Your whole page does not loads but only the content part that needs to be altered, so saving the crucial time for the users and giving the snazzy look to the website.
l2. Plug-ins, we don’t need them:- dHTML uses most of the features already present in the browsers, so there is no need to download any sort of Plug-ins.
Advantages of DHTML
l3. Great Utility:- The dynamic features possessed by dHTML are helping web designers to create Web pages that posses compact looks, downloads fast, have graphic effects, provides greater functionality and can hold much more text or content all at the same time.

Disadvantages
lUses script languages which mean
All variables are variants
Error handling is limited
lDebugging can be awkward
lCostly Editing tools: - although dHTML provides great functionality but the editors’ available for that in market are pretty expensive. Examples of dHTML editors are Dreamweaver and Fusion.
lLong and Complex coding: - dHTML coding is long and complex. Only the expert Javascript and HTML programmers can write them and edit them with good degree of functionality.
lBrowser Support problems: - dHTML suffers from browser support problems for different browsers. For example, a code written for Netscape might not work in Internet Explorer and Vice-Versa. The problem arises due to the different features of browsers.


What is HTML?
4Telling the browser what to do, and what props to use.
4A serises of tags that are integrated into a text document.

Tags are ;
4 surrounded with angle brackets like this
* <B> or <I>.
4Most tags come in pairs
* exceptions: <P>, <br>, <li> tags …
4The first tag turns the action  on, and the second turns it off.
4The second tag(off switch)  starts with a forward slash. 
* For example ,<B> text </B>
4can embedded, for instance, to do this:
* <HEAD><TITLE> Your text </HEAD></TITLE> it won't work.
* The correct order is <HEAD><TITLE> Your text </TITLE></HEAD>
4not case sensitivity. 
4Many tags have attributes.
*  For example, <P ALIGN=CENTER> centers the paragraph following it.
4Some browsers don't support the some tags and some attributes.

Structure of HTML
HTML documents are structured into two parts, the
    HEAD, and the BODY
The head contains information about the document
    that is not generally displayed with the document,
    such as its TITLE.
The BODY contains the body of the text, and is
    where you place the document material to be
    displayed. Elements allowed inside the HEAD,

Basic HTML Document Format


How to Create and View an HTML document?
1.Use an text editor such as Editpad to write the document.
2.Save the file as filename.html on a PC. This is called the Document Source.
3.Open Netscape (or any browser) Off-Line
4.Switch to Netscape
5.Click on File, Open File and select the filename.html document that you just created.
6.Your HTML page should now appear just like any other Web page in Netscape.
7.You may now switch back and forth between the Source and the HTML Document
lswitch to Notepad with the Document Source
lmake changes
lsave the document again
lswitch back to Netscape
lclick on RELOAD and view the new HTML Document
lswitch to Notepad with the Document Source......

HTML Disadvantages
Page numbers corresponding to the
   print are often not present
May require multiple files
May require on-line access

HTML Advantages
Widely available
Supports navigation by heading if properly tagged
Works with a wide range of AT
Known Web surfing concepts apply

No comments:

Post a Comment