|
To access the contents, click the chapter and section titles.
HTML 4.0 Sourcebook
TEXTAREA provides a mechanism for the user to input a block of text. Usually this is done by providing a text input window. The text input by the user can grow to almost unlimited size, and is not limited, either horizontally or vertically, by the size of the displayed input window. Scrollbars are often presented if the text entered into a TEXTAREA grows to be (or initially is) bigger than the displayed region. Figure 6.23 HTML example document illustrating FORM INPUT, SELECT, and TEXTBOX input elements. Figure 6.24 shows this document as displayed by the Netscape Navigator 3 browser. <HTML><HEAD><TITLE> HTML FORM Example (2)</TITLE></HEAD> <BODY> <H2>HTML FORM Example (2) </H2> <P>Submit your abstract for registration in the appropriate databases. <FORM ACTION=http://side.edu/cgi-bin/submit_abstract> <B>1. Please give Name and Password </B> <BLOCKQUOTE> <B>Name:</B> <INPUT TYPE=text NAME=userid VALUE=guest SIZE=20> <B>Password:</B> <INPUT TYPE=password NAME=password VALUE=bozo... SIZE=8> </BLOCKQUOTE> <B>2. Select Appropriate Database(s)</B> <BR> <BLOCKQUOTE> <B>Physics: </B> <SELECT NAME=physics_database MULTIPLE SIZE=3> <OPTION SELECTED> Condensed-Matter <OPTION> High Energy <OPTION> Solid-State <OPTION> Quantum Cosmology <OPTION> Astrophysics </SELECT> <B>Chemistry: </B> <SELECT NAME=chemistry_database MULTIPLE SIZE=3> <OPTION> Surface Dynamics <OPTION> Quantum Chemistry <OPTION SELECTED> Polymer Dynamics <OPTION> Biochemistry <OPTION> Nuclear Chemistry </SELECT> </BLOCKQUOTE> <B>3. Enter Abstract: </B> <BLOCKQUOTE> <TEXTAREA NAME=abstract COLS=50 ROWS=4> If you are submitting an abstract, select the desired databases from the above list, delete this text, type (or paste) the abstract into this box and press the Deposit Abstract button. </TEXTAREA> </BLOCKQUOTE> <B>4. Submit Form or Reset --</B> <INPUT TYPE=submit NAME=depo VALUE=Deposit Abstract> <INPUT TYPE=reset VALUE=Reset Form> </FORM> <HR> <ADDRESS> Form by <A HREF=about_the_author.html> I.S.G</A> </ADDRESS> </BODY></HTML>
The size of a TEXTAREA is set by the COLS and ROWS attributes (the default size in the absence of these attributes is browser-specific). Since TEXTAREA windows usually display characters using a fixed-width font, COLS specifies the input box width as a number of characters, while ROWS specifies the height as the number of displayable text rows. TEXTAREA input can include any printable characters: The TEXTAREA data are simply characters to be sent elsewhere. Thus a person typing text into a TEXTAREA can in principle send an entire HTML document to a server by typing (or cutting and pasting) the document into the TEXTAREA. By default, text in a TEXTAREA does not wraplines can be as long as desired, with line wrapping only occurring at carriage returns explicitly typed in by the user. In some cases, it is more convenient if the TEXTAREA element itself automatically wraps the text, either virtually (the lines are displayed with wrapping, but the software-imposed new-line characters are not sent as part of the TEXTAREA data) or physically (the new-line characters introduced by the TEXTAREA formatting are sent as part of the TEXTAREA data). Netscape Navigator supports a special WRAP attribute that allows for these options. The attributes are:
Text placed inside a TEXTAREA element is displayed as an initial value: A browser provides some way to edit the displayed text. Note that HTML markup tags are not interpreted inside a TEXTAREA, and are displayed as plain text. However, entity and character references inside a TEXTAREA element are interpreted and are converted to their respective characters prior to being displayed. Figures 6.23 and 6.24 show a typical example of a TEXTAREA element. Lists and List-Related ElementsThere are two broad categories of list elements. Description lists (DL) define glossary-like lists, and can only contain two elements: DT (description term) and DD (the description). Regular lists define numbered or bulleted items. There are four regular list elementsDIR, MENU, OL, and UL. These elements can contain one thing: LI elements, which define the items within the list.
The list elements support nesting of lists: DD and LI elements can contain any of the list element types, in addition to regular block elements such as paragraphs or tables. DL Element: Glossary List
This list type, known as a definition or glossary list, is designed for a list of items each with an associated, descriptive paragraph. This can be used, for example, for traditional glossaries. A DL list can contain two elements:
Logically, DT and DD elements should appear in pairs. However, the specification does not require this, so that you can have DT and DD elements in any order you like. In general, DT elements are rendered flush with the left margin, while DD elements are placed one line below the DT and slightly indented.
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |