SiteExperts.com Logo Home | Community | Developer's Paradise | Jobs
User Groups | Site Tools | Site Information | Search

Inside Technique : Creating 2D Forms : HTML Forms

First, it is important to understand how and where form input elements can be used. A form and the input element's behavior is defined by the HTML 4.0 recommendation. While most uses of form elements are inside of FORM blocks, HTML 4.0 (as well as HTML 3.2) allow form input elements to be freely included in your page, without requiring the surrounding FORM element.

For example, you can include an input button in the middle of your document as we did in the first page. Using input elements freely in your document is very useful when the elements are going to be manipulated by script and whose values are not being submitted to the server. Unfortunately, at this time, Netscape Navigator does not correctly support form elements outside of form blocks. Instead, the input element is just ignored.

For this reason, you have reached the first rule of using cross-browser form elements: Always include input elements inside of a form block:

  <FORM>
    <INPUT TYPE="button" VALUE="Sample">
  </FORM>

While this rule is very simple, this rule becomes extremely important as we examine a fundamental difference between CSS-P in Netscape Navigator and Internet Explorer.

Page 1:Creating 2D Forms
Page 2:HTML Forms
Page 3:CSS-P and Forms
Page 4:CSS-P and DHTML
Page 5:Creating a 2D Form
Page 6:DemonstrationIE4, NS4
Page 7:The Code