Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

[ . ]
 
[ Web Magic ]

Web Master Tricks
HTML Elements - Forms & Tables

[ line ]

This page of Web Magic contains a guide to HTML elements for forms and tables. A few very useful tips to the proper use of the tag elements will help to cut down on the amount of coding within your pages and utilize the elements as they were meant to be utilized :)

[ Form Elements | Introduction to Forms | Table Elements ]

Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

 

[ line ]

Forms

I would like to encourage those who provide forms on their site to always include a comment textarea!

This is true even with CGI scripts written to collect various data. It would be a basic consideration for those wishing to supply extra needed information or comments. There are times when specific applications require an extra input field.

If you are collecting personal information from visitors, provide a privacy statement to include how this information will be used.

Define Form<FORM ACTION="URL" METHOD=GET|POST></FORM>
Input Field<INPUT TYPE="TEXT|PASSWORD|CHECKBOX|RADIO| IMAGE|HIDDEN|SUBMIT|RESET">
Field Name<INPUT NAME="***">
Field Value<INPUT VALUE="***">
Checked?<INPUT CHECKED> (checkboxes and radio boxes)
Field Size<INPUT SIZE=?> (in characters)
Max Length<INPUT MAXLENGTH=?> (in characters)
Selection List<SELECT></SELECT>
Name of List<SELECT NAME="***"></SELECT>
# of Options<SELECT SIZE=?></SELECT>
Multiple Choice<SELECT MULTIPLE> (can select more than one)
Option<OPTION> (items that can be selected)
Default Option<OPTION SELECTED>
Input Box Size<TEXTAREA ROWS=? COLS=?></TEXTAREA>
Name of Box<TEXTAREA NAME="***"></TEXTAREA>

[ line ]

Opening and closing tags for forms are very misused within banner exchanges and coding supplied by affiliate programs. Many people fail to close an opening tag prior to closing a previous open tag. Others when using tables, put form opening and closing tags within various cells which are not interpreted correctly due to being embedded within the table. Be careful when using forms and tables and verify your coding to be sure it will function properly!

Please note that your email is available to email spam robots through your forms :( Try inserting <!-- stopindex --> prior to your form command lines and <!-- startindex --> afterwards. This may help prevent these robots from accessing your email from necessary from elements.

[ Back to Top ]

Tables

Define Table<TABLE></TABLE>
Table Border<TABLE border=?></TABLE>
Cell Spacing<TABLE CELLSPACING=?>
Cell Padding<TABLE CELLPADDING=?>
Desired Width<TABLE width=?> (in pixels)
Width Percent<TABLE width="%"> (percentage of page)
Table Row<TR></TR>
Alignment<TR align=LEFT|RIGHT|CENTER|MIDDLE|BOTTOM
Valign=TOP|BOTTOM|MIDDLE>
Table Cell<TD></TD> (must appear within table rows)
Alignment<TD align=LEFT|RIGHT|CENTER|MIDDLE|BOTTOM
Valign=TOP|BOTTOM|MIDDLE>
No line breaks<TD NOWRAP>
Columns to Span<TD COLSPAN=?>
Rows to Span<TD ROWSPAN=?>
Table Header<TH></TH> (same as data, except bold centered)
Alignment<TH align=LEFT|RIGHT|CENTER|MIDDLE|BOTTOM
Valign=TOP|BOTTOM|MIDDLE>
No Line breaks<TH NOWRAP>
Columns to Span<TH COLSPAN=?>
Rows to Span<TH ROWSPAN=?>
Table Caption<CAPTION></CAPTION>
Alignment<CAPTION align=TOP|BOTTOM> (above/below table)

[ line ]

Although widely used, using background colors within table cells does not conform to HTML 3.2 standards.

The most common lack of use for form tags have been:

Using: <TD><B> text </B></TD> . . when the use of <TH> serves the same purpose and takes less coding :)

this line uses the bold tag
this line uses the TH tag
since this is a header tag the cell contents are centered by default

<TR><TD align=center></TD><TD align=center></TD></TR>
or <TR><TD><center> </center> </TD></TR>

the same can be accomplished by using:

<TR align=center><TD></TD><TD></TD></TR>

Never leave a table cell empty within a table. If you have a cell which does not contain data, insert a non-breaking space character within the table cell:

<TR><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>

[ line ]

[ Back to Top | Home ]

Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

[ Creative Computing ]

[ Recommend Our Site ]     [ Creative Computing ]     [ HTML 3.2 Validated ]

Copy & Copyright (c) 1998 - 2006   Creative Computing

Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

Please Click To Visit Our Friends At:
Home

Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

HTML Tips
HTML Validation
CGI Tips
Web Security
Search Engines
Spam Mail

Online Services
META Tag
    Generator

Web Whois

Site Resources
Site Links
Earn Cash

DBMan FAQ

Creative Computing

Contact
Guest Book

[ Recommend ]

[ Site Map ]

    [ Cross ]

[ Creative's Health News ]

[.]