Skip to main content

Posts

Check Box

Check Box : Check boxes allow the users to select more than one option . <INPUT TYPE=“CHECKBOX”> Checkboxes have the following attributes: § TYPE: checkbox. § CHECKED: is blank or CHECKED as the initial                        status. § NAME : is the name of the variable to be sent to the                 CGI application. § VALUE: is usually set to a value. Example on Check Box <HTML>  <HEAD> <TITLE> CheckBoxType </TITLE>  </HEAD> <BODY> <h1> <font color=green>Please check one of the following</font></h1> <FORM name=" form3 "  Action=" url "  method="get"> <font color=red> Select Country: </font><BR> Sri Lanka:< INPUT TYPE=" CheckBox " Name="country"  CHECKED><BR> England<INPUT TYPE=" CheckBox "  ...

Password

Password : Used to allow entry of passwords. <INPUT TYPE= " PASSWORD " > Password boxes use the following attributes: § TYPE: password. § SIZE: determines the size of the textbox in characters. § MAXLENGHT: determines the maximum size of the password in characters. § NAME: is the name of the variable to be sent to the CGI application. § VALUE: is usually blank. Example on Password Box <HTML><HEAD> <TITLE> Form_Password_Type </TITLE></HEAD> <BODY> <h1> <font color=red>To Access, Please enter:</font></h1> <FORM name=" form2 "  Action=" url "  method="get"> User Name: <INPUT TYPE="TEXT" Name=" FName " SIZE="15" MAXLENGTH="25"><BR> Password: <INPUT TYPE="PASSWORD" NAME=" PWord "   value="" SIZE="15” MAXLENGTH="25"><BR> ...

Text Box

Text boxes : Used to provide input fields for text, phone numbers, dates, etc. <INPUT TYPE= " TEXT " > Browser will display Textboxes use the following attributes: § TYPE: text. § SIZE: determines the size of the textbox in characters. Default=20 characters. § MAXLENGHT : determines the maximum number of characters that the field will accept. § NAME: is the name of the variable to be sent to the CGI application. § VALUE: will display its contents as the default value. Example on Text Box  <HTML> <Head> <TITLE> Form_Text_Type </TITLE> </HEAD>  <BODY> <h1> <font color=blue > Please enter the following BioData </font></h1> <FORM name=" form1 "  Method= " get " Action= " URL " > First Name: <INPUT TYPE="TEXT" NAME=" FName " SIZE="15" MAXLENGTH="25"><BR> Last Name: <INPUT TY...

HTML Forms

§ To insert a form we use the <FORM></FORM> tags. The rest of the form elements must be inserted in between the form tags . <HTML>   < HEAD>   < TITLE> Sample Form</TITLE>   </ HEAD>   < BODY BGCOLOR=“FFFFFF”>   < FORM       ACTION = http:// www.xyz.com/formtest . php >   < P> First Name: <INPUT TYPE=“TEXT” NAME=“ fname ” MAXLENGTH=“50”> </P>   < P> <INPUT TYPE=“SUBMIT” NAME=“ fsubmit ” VALUE=“Send Info”> </P>   </ FORM >   </ BODY> </ HTML> <FORM> element attributes § ACTION : is the URL of the CGI (Common Gateway Interface) program that is going to accept the                     data from the form, process it, and send a response back to the browser. § METHOD : GET (default) or POST specifies which HTTP method ...

Nested Tables

Table Data and Table Header Attributes Colspan: Specifies how many cell columns of the table this cell should span. Rowspan : Specifies how many cell rows of the table this cell should span. Align : cell data can have left, right, or center alignment. Valign : cell data can have top, middle, or bottom alignment. Width : you can specify the width as an absolute number of pixels or a percentage of the document width. Height : You can specify the height as an absolute number of pixels or a percentage of the document height. Basic Table Code <TABLE BORDER=1 width=50%> <CAPTION>   <h1>Spare Parts <h1> </Caption>          <TR><TH>Stock Number</TH><TH>Description</TH><TH>List Price</TH></TR>          <TR><TD bgcolor=red>3476-AB</TD><TD>76mm S...

Frames

A framed page is actually made up of multiple HTML pages. There is one HTML document that describes how to break up the single browser window into multiple windowpanes. Each windowpane is filled with an HTML document. Frame Page Architecture §   A <FRAMESET> element is placed in the html document before the <BODY> element. The <FRAMESET> describes the amount of screen real estate given to each windowpane by dividing the screen into ROWS or COLS . §   The <FRAMESET> will then contain <FRAME> elements, one per division of the browser window. §   Note: Because there is no BODY container, FRAMESET pages can't have background images and background colors associated with them. Frame Page Architecture <HTML> <HEAD> <TITLE> Framed Page </TITLE> <FRAMeSET COLS=“23%,77%”> <FRAME SRC=“Doc1.html”> <FRAME SRC=“Doc2.html”> </FRAMeSET > </HEAD> ...