Archive for September, 2009

HTML Layout

Everywhere on the Web you will find pages that are formatted like newspaper pages using HTML columns.

HTML Layout – Using Tables

One very common practice with HTML, is to use HTML tables to format the layout of an HTML page.A part of this page is formatted with two columns, like a newspaper [...]

HTML Fonts

The <font> tag in HTML is deprecated. It is supposed to be removed in a future version of HTML.
Even if a lot of people are using it, you should try to avoid it, and use styles instead.

The HTML <font> Tag
With HTML code like this, you can specify both the size and the [...]

HTML 4.0 Why

HTML 3.2 Was Very Wrong !
The original HTML was never intended to contain tags for formatting a document. HTML tags were intended to define the content of the document like:
<p>This is a paragraph</p>
<h1>This is a heading</h1>
When tags like <font> and color attributes were added to the HTML 3.2 specification, it started a [...]

HTML Styles

With HTML 4.0 all formatting can be moved out of the HTML document and into a separate style sheet.

How to Use Styles
When a browser reads a style sheet, it will format the document according to it. There are three ways of inserting a style sheet:
External Style Sheet
An external style sheet is ideal [...]

HTML Head

The Head Element
The head element contains general information, also called meta-information, about a document. Meta means “information about”.
You can say that meta-data means information about data, or meta-information means information about information.

Information Inside the Head Element
The elements inside the head element should not be displayed by a browser.
According to the HTML [...]

HTML Meta

The Meta Element
As we explained in the previous chapter, the head element contains general information (meta-information) about a document.
HTML also includes a meta element that goes inside the head element. The purpose of the meta element is to provide meta-information about the document.
Most often the meta element is used to provide [...]

HTML URLs

HTML Links
When you click on a link in an HTML document like this: Last Page, an underlying <a> tag points to a place (an address) on the Web with an href attribute value like this: <a href=”index.asp”>Last Page</a>.
The Last Page link in the example is a link that is relative to the [...]

HTML Scripts

Add scripts to HTML pages to make them more dynamic and interactive.

Insert a Script into HTML Page
A script in HTML is defined with the <script> tag. Note that you will have to use the type attribute to specify the scripting language.

<html>
<head>
</head>
<body>
<script type=”text/javascript”>
document.write(”Hello World!”)
</script>
</body>
</html>

The script above will produce this output:
Hello World!

How to Handle [...]

HTML Attributes

HTML tags can have attributes. The special attributes for each tag are listed under each tag description. The attributes listed here are the core and language attributes that are standard for all tags (with a few exceptions):

Core Attributes
Not valid in base, head, html, meta, param, script, style, and title elements.

Attribute
Value
Description

class
class_rule or [...]

HTML Events

New to HTML 4.0 is the ability to let HTML events trigger actions in the browser, like starting a JavaScript when a user clicks on an HTML element. Below is a list of attributes that can be inserted into HTML tags to define event actions.

Window Events
Only valid in body and frameset elements.

Attribute
Value
Description

onload
script
Script [...]