Saturday, 9 June 2012

What is DHTML

DHTML stands for Dynamic HTML. The first thing that we need to clear about DHTML is that it is neither a language like HTML, JavaScript etc. nor a web standard. It is just a combination of HTML, JavaScript and CSS. It just uses these languages features to build dynamic web pages. DHTML is a feature of Netscape Communicator 4.0, and Microsoft Internet Explorer 4.0 and 5.0 and is entirely a "client-side" technology.

Friday, 3 June 2011

What is style sheet


Style sheet language used to describe the look and formatting of a document written  in markup language. Style sheets are powerful way for adding styles in web documents. Style sheet give us a greater control over the presentation of web document. It provides more flexibility and reduces complexity.
Syntax:
            Item {property: value};
There are three types of style sheet files:
1.                                          Inline style sheet
2.                                          Internal style sheet or Embedded style sheet
3.                                          External style sheet

1. Inline style sheet - In the In-line style, the type style is defined within the body of the HTML document itself. E.g. in the paragraph tag <p> we can specify the style as follows:
<h1 style=”font: “Arial” 18px>
                        Vaishnoo Maa Computers
            </h1>
2. Internal style sheet - A style sheet can be fully defined in header section with the <style> and </style> tags. This way of defining style sheet is called an internal style sheet.
            <head>
            <title>CGS</title>
            <style>
Body {font: 14px; color: black; background:orange}
P {font: 12pt”times roman”}
H4 {font: 26pt”times roman”}
            </style>
</head>
3. External style sheets - In case of an external style sheet, it is stored in a separate file. This style sheet can be linked to any number of HTML documents. We use <link> tag in header section to link a external style sheet to HTML document.
            <head>
            <LINK rel="stylesheet" type="text/css" href="exstyle.css" title="style1">
            </head>
            Consider the style sheet “exstyle.css”, which is shown below
Body {font: 14px”arial”; color: black;}
H1 {font: 12pt”times roman” bold}
A {text-decorator: blinking; color: green}

DHTML and its Features


DHTML - Dynamic Hypertext mark up language. When we use style sheets and JavaScript in HTML file called DHTML. DHTML sites going fast upon client-side technologies.
Features of DHTML:
·                                             Style sheets
·                                             Absolute positioning
·                                             Multimedia effects
·                                             Database access facility
·                                             Dynamic fonts
·                                             Scripting

Style sheet - Style sheet language is used to describe the look and formatting of a document written in markup language. Style sheets are powerful way for adding styles in web documents. Style sheet gives us a greater control over the presentation of web document. It provides more flexibility and reduces complexity.
Syntax:
            Item {property: value};
            E.g.
                        <h1 style=”font: “Arial” 18px>
            Vaishnoo Maa Computers
                       </h1>

There are three types of style sheet files:

1.                                          Inline style sheet
2.                                          Internal style sheet or Embedded style sheet
3.                                          External style sheet


Elements of styles

·                                             Style usually defines the following:
·                                             Font name, size and style
·                                             Text indent
·                                             Margins (left and right)
·                                             Background and text color
·                                             Text alignment

spacing and cell padding



Cellspacing. This attribute sets the width in pixels between the individual table cells. Cellspacing attribute sets the amount of space between the cells. Most browsers normally put two pixels of space between cells. If you leave out the cellspacing attribute, you will get a thin gap between cells.

Cellpadding. Its value, supplied as number of pixels, denotes the amount of space between the edge of the table and its contents. CELLPADDING sets the amount of space (both horizontal and vertical) between the cell wall and the contents. The default value for CELLPADDING (i.e., if you don't use the attribute at all) is 1.


List in HTML


Lists in HTML are used to present the text in stepped form. It may be ordered or
Unordered (means numbered or unnumbered)
HTML provides three types of lists.
  • Ordered                  
  • Unordered                 

Advantages of HTML


  • HTML is easy to use, learn and understand.
  • It is platform independent.
  • It is used create web sites.
  • It is used to link other sites or personal images to our web pages.
  • It is not case sensitive.
  • HTML is flexible i.e. we can always work on our web sites even when we are away   computer we usually work on. 
  • We can create or code programs of html in any text editor.
  • Using HTML does not cost anything. There are no expensive licenses to but it.

Body Tag Attributes

Explain the attributes of body tag with example.



The largest part of your HTML document is the body, which contains the content of your document (displayed within the text area of your browser window).  All HTML tags that pertain to the body of your HTML document must be places between the open <BODY> tag and the closed </BODY> tag. The tag has attributes which you can use to set the colors of your background, text, links, and also to include your own background image. They are as follows:

BGCOLOR=”white” Sets the background color (other color names: red, black, blue etc)

TEXT=”black”             Sets the body text color


LINK=”blue”                Sets the unvisited hypertext links

VLINK =”purple”         Sets the visited hypertext links

ALINK=”red”   Sets the active hypertext links (the color of the hypertext link when you have your mouse button depressed)

BACKGROUND        Let you use an image as the background

Body attributes are used as part of the open <body> tag. For example:

<BODY BGCOLOR = "white" TEXT = "black" LINK = "blue" VLINK = "purple" ALINK = "red" BACKGROUND=”c:\clouds.jpg