Tuesday, August 28, 2012

Dynamic HTML


DHTML is a new and emerging technology that has evolved eye catching and mind catching web sites. DHTML combines HTML with Cascading Style Sheets (CSS) and Scripting Language.

Style Sheet:
A style sheet is a list of style rules that describe the style and appearance of an html document. Styles are used in a webpage to control the font size, color, etc. The Style assignment process is accomplished with the <STYLE> …</STYLE> tags. The <STYLE> …</STYLE> tags are written with in the <HEAD> …</HEAD> tags. You can group more than one style rule using the <style>……</style>tag pair unlike of applying it individually in inline Style. Each of these tags when used in the BODY of HTML code will apply the style rules. 
Style rule:-A style rule is a set of html tags specifying the formatting element. Style rule can be applied to selected contents of a webpage.
Style rules can be divided into two parts.
Ø Selector:-A selector is a string that identifies what elements the corresponding rule applies to and is the first part of the rule.
Ø Declaration:-This part of the rule is enclosed within curly brackets. A declaration has two sections separated by a colon. The section before the colon is the property and the one after the colon is the value of that property.
Selector {property: value}
Where,
Selector=any html tag  without angular brackets.
Property=attributes like font color, font size etc.
Value=settings  for the attribute
E.g. H2 {color: red}
H2 is the selector, color: red is the declaration, color is the property and red is the value.
In the <STYLE> tags, the expression type=text/css indicates that the style sheet confirms to css syntax. 

There are three types of Style Sheet:
a.     Inline style sheet
b.    Embedding  style sheet
c.     Contextual selectors

No comments:

Post a Comment