Tech Notes

Charles E. Oyibo
Web · E-mail


[DHTML = HTML 4.0 + CSS + DOM + JavaScript (or another scripting language.]

JAVA

JavaSript

ActiveX Objects & VBScript

VBScript

Special Elements

Meta Elements

  1. Client Pull & Page Animation. Here, the HTML page has a META element inside the HEAD element that instructs the browser to refresh the view of that page. Other attributes of the REFRESH instruction specify the time interval and the URLs to be used. In this way, a series of pages can be presented without the user requesting the new pages to be loaded
  2. Description
  3. Keywords
  4. Author
  5. Company
  6. Copyright
  7. et cetera

Adding Sound to an HTML page

Animation Elements

<MARQUEE>...<MARQUEE>. Defines text that is displayed in an animated region of the browser.

Attributes:

Note that the MARQUEE element is currently supported only by Internet Explorer. Navigator just displays the text between the MARQUEE tags.

<BLINK>...</BLINK>

Cascading Style Sheets

selector {property: value; property: value; ... }

There are two parts to any style rule:

There are three ways to apply styles sheets to an HTML document:

1. Inline Styles: Adds a style attribute to a specific instance of an element using the following syntax:

<ELEMENT STYLE="property: value; property: value; ..."> ... </ELEMENT>

2. Embedded Syle Sheets: Defines a style block (delimited by the <STYLE>...</STYLE> tags), which is placed in the HEAD section of the document:

<HEAD>
<TITLE>...</TITLE>
<STYLE TYPE="text/css"><!--
...
--></STYLE>
</HEAD>

Note that the embedded style sheet is enclosed within an HTML comment (<!--...-->). This is done in order for the content to be ignored by non-css browsers, but still interpreted by css-compliant browsers.

3. Linked Style Sheets

Classes

Use classes if you: (1) expect to have formatting variations for different instances of a single element, or, (2) would like to have different elements share the same format.

In HTML document:

<H2 CLASS="sales">Style associated with the sales class is applied to the text enclosed within these H2 tags<H2>

In CSS document:

<STYLE><!--
.sales {color: #000000;
        text-decoration:         underline;
}
--></STYLE>

Notice that the selector (sales) begins with a period (.), which is the required syntax for class names as selectors.

ID

In general, while Class names are usually given to grounps of element instances sharing some common functions or format (relative importance, context, etc.), ID is used to identify one specific instance of an element. Style rules selected by an ID attribute are declared using the pound sign (#) to precede the selector:

<STYLE><!--
#mainhead {color: red}
--></STYLE>

Note that while many elements can have the same CLASS attribute value, only one element in any document can have a particular ID attribute value.

DIV & SPAN

Cascading & Inheritance


Last Updated: Monday March 28, 2005 11:15 PM
Charles E. Oyibo
Web · E-mail