JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Web Forms and HTML

Web forms are written in HTML, so to work with them (and customize them), you should have a working knowledge of HTML. They also include Active Server Pages (ASP) elements, but Visual Basic manages them for us, so it's less necessary to know ASP in detail. However, if you want to implement client-side scripting of HTML elements in your Web forms, you also should know a scripting language that the target browser can use, such as JavaScript. A good book for both HTML and JavaScript is the Coriolis HTML Black Book, which not only includes all HTML elements and how to use them, but also has a number of chapters on JavaScript, as well as how to use JavaScript with HTML controls. For reference, I'm including a quick listing of all the HTML tags in HTML 4.01 in Table 14.4.

Table 14.4: HTML 4.01 tags.

Tag

Use for:

<!-->

Comments and server-side includes

<!doctype>

Starting an HTML page

<a>

Creating a hyperlink or anchor

<abbr>

Displaying abbreviations

<acronym>

Displaying acronyms

<address>

Displaying an address

<applet>

Embedding applets in Web pages

<area>

Creating clickable regions in image maps

<b>

Creating bold text

<base>

Setting the base for hyperlinks

<basefont>

Setting the base font

<bdo>

Overriding the bidirectional character algorithm

<bgsound>

Adding background sounds

<big>

Creating big text

<blink>

Making text blink

<blockquote>

Indenting quotations

<body>

Creating a Web page's body

<br>

Inserting line breaks

<button>

Creating a customizable button

<caption>

Creating a table caption

<center>

Centering text

<cite>

Creating a citation

<code>

Displaying program code

<col>

Defining a column

<colgroup>

Grouping and formatting columns

<dd>

Creating definition list definitions

<del>

Displaying text as deleted

<dfn>

Defining new terms

<dir>

Creating a list (obsolete)

<div>

Formatting block text

<dl>

Creating definition lists

<dt>

Creating definition list terms

<em>

Emphasizing text

<embed>

Embedding multimedia and plug-ins in a Web page

<fieldset>

Grouping form elements

<font>

Specifying a font

<form>

Creating HTML forms

<frame>

Creating frames

<frameset>

Creating frames

<h1> through <h6>

Creating Web page headings

<head>

Creating a Web page's head

<hr>

Creating horizontal rules

<html>

Starting an HTML page

<i>

Creating italic text

<iframe>

Creating inline or floating frames

<ilayer>

Creating inline layers

<img>

Adding an image to a Web page

<input type=button>

Creating buttons

<input type=checkbox>

Creating checkboxes

<input type=file>

Creating file input for a form

<input type=hidden>

Creating hidden data

<input type=image>

Creating image submit buttons

<input type=password>

Creating password controls

<input type=radio>

Creating radio buttons

<input type=reset>

Creating reset buttons

<input type=submit>

Creating submit buttons

<input type=text>

Creating text fields

<ins>

Displaying inserted text

<isindex>

Using an index

<kbd>

Displaying text the user is to type

<keygen>

Processing secure transactions

<label>

Labeling form elements

<layer>

Arranging text in layers

<legend>

Creating a legend for form elements

<li>

Creating list items

<link>

Setting link information

<map>

Creating client-side image maps

<marquee>

Displaying text in a scrolling marquee

<menu>

Creating a list (obsolete)

<meta>

Giving more information about your Web page

<multicol>

Creating columns

<nobr>

Avoiding line breaks

<noembed>

Handling browsers that don't handle embedding

<nolayer>

Handling browsers that don't handle layers

<noscript>

Handling browsers that don't handle JavaScript

<object>

Placing an object into a Web page

<ol>

Creating ordered lists

<optgroup>

Creating a select control item group

<option>

Creating a select control item

<p>

Creating paragraphs

<param>

Specifying a parameter

<pre>

Displaying preformatted text

<q>

Displaying short quotations

<rt>

Creating ruby text

<ruby>

Creating rubies

<s> And <strike>

Striking text out

<samp>

Displaying sample program output

<script>

Creating a script

<select>

Creating a select control

<server>

Running server-side JavaScript scripts

<small>

Creating small text

<spacer>

Controlling horizontal and vertical spacing

<span>

Formatting inline text

<strong>

Strongly emphasizing text

<style>

Using embedded style sheets

<sub>

Creating subscripts

<sup>

Creating superscripts

<table>

Creating a table

<tbody>

Create a table body when grouping rows

<td>

Creating table data

<textarea>

Creating text areas

<tfoot>

Create a table foot when grouping rows

<th>

Creating table headings

<thead>

Creating a table head when grouping rows

<title>

Giving a Web page a title

<tr>

Creating a table row

<tt>

Creating "teletype" text

<u>

Underlining text

<ul>

Creating unordered lists

<var>

Displaying program variables and arguments

<wbr>

Allowing word breaks

<xml>

Accessing XML data with an XML data island

You should be familiar enough with HTML to know, for example, that HTML elements start with an opening tag, <h1> here, and often end with a closing tag, </h1>, such as this example, where I'm creating an h1 heading with the text "Here is a heading!":

<h1>Here is a heading!</h1>

You also should be familiar enough with HTML to know, for example, that this <input> element creates a 40-character long text field with the name "text1", which can take 60 characters maximum, and that this input element has four attributes—type, name, size, and maxlength:

<input type= "text" name = "text1" size = "40" maxlength = "60">
Tip 

For the sake of reference, I've written and included on the CD-ROM an HTML file (open it in your browser) named htmlref.html, which is a complete HTML element reference. It includes all the HTML 4.01 elements (and additional ones that are browser-specific), all their attributes, what they mean, where you can use them, and in which browsers. Hopefully, that'll be all the reference you need, but if not, check out a good book on the subject, such as the HTML Black Book referred to earlier.

Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor