to home page


<button> Tag  
Save 50-70% on INK cartridges.
 


The
<button>
tag

 

HOME
TUTORIALS
LINKS
FORUM
GLOSSARY
NEWS/ABOUT

THIS AREA

MAIN

BASICS
Basic Tutorial
Advance Tutorial

Beyond Tips
frames
sound
video
forms
Main
Introduction
Getting started
<input> basics

<input> Types
Form Properties
Comments form
<button> tag
Other Resources


Java &JavaScript
event handlers

Composer Hints

Reviews

 

 

BWRS
SEARCH

 

 

 

 

 

We've seen all the basics you need to know about for adding a inputs with forms.

Traditionally the <input type="button"> tag (together with submit and reset types) was used to create buttons for forms.

The buttons created although functional had their limitations (usually grey with black text)

But in HTML 4.0 a new way of adding buttons was born

The <button> tag was launched

To add it just add the HTML as described elsewhere on this tutorial area

Here's a simple example

<button type="submit">send</button>

Okay not too different so far. You must designate what type of button you have (use submit, reset and button) using the type attribute. Note how the simple text becomes the name on the button

You can add name and value attributes as before if you want.

Now the cool thing is that you can alter the button's label with ease

e.g.

<button type="submit">
<font color="#FF0000">
<b><i>send</b></i></font>
</button>

gives rise to

You can add images with all the power of the image tag

e.g.

<button type="submit">
<img src="b_stone.gif" alt="send" align="middle">
<b><i>send</b></i></button>

 

You could even add a table if you were feeling mad enough

This adds more flexibility to your Forms

back to top

GUESTBOOK
/COMMENTS
FORM

back to guestbook formForm resources

FORM RESOURCES

This page © 2002 A.Duncan BWRS

terms & conditions copyright © 1999-2003 legal notices
home
credits
contact us link to us