HTML
  Home arrow HTML arrow Page 3 - Handling Hyperlinks and Images in HTML
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

Handling Hyperlinks and Images in HTML
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2008-04-03

    Table of Contents:
  • Handling Hyperlinks and Images in HTML
  • 2.8 Images Are Special
  • 2.9 Lists, Searchable Documents, and Forms
  • 2.10 Tables
  • 2.12 Stylesheets and JavaScript

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Handling Hyperlinks and Images in HTML - 2.9 Lists, Searchable Documents, and Forms


    (Page 3 of 5 )

    Thought we'd exhausted text elements? Headers, paragraphs, and line breaks are just the rudimentary text-organizational elements of a document. The languages also provide several advanced text-based structures, including three types of lists, "searchable" documents, and forms. Searchable documents and forms go beyond text formatting, too; they are a way to interact with your readers. Forms let users enter text and click checkboxes and radio buttons to select particular items and then send that information back to the server. A special server application then processes the form's information and responds accordingly; for example, filling a product order or collecting data for a user survey.*

    The syntax for these special features and their various attributes can get rather complicated; they're not quick-start grist. We'll mention them here, but we urge you to read on for details in later chapters.

    2.9.1  Unordered, Ordered, and Definition Lists

    The three types of lists match those we are most familiar with: unordered, ordered, and definition lists. An unordered list--one in which the order of items is not important, such as a laundry or grocery list--gets bounded by <ul> and </ul> tags. Each item in the list, usually a word or short phrase, is marked by the <li> (list-item) tag and, particularly with XHTML, the </li> end tag. When rendered, the list item typically appears indented from the left margin, preceded by a bullet symbol. [<ul>, 7.1.1] [<li>, 7.3]

    Ordered lists, bounded by the <ol> and </ol> tags, are identical in format to unordered ones, including the <li> tag (and </li> end tag with XHTML) for marking list items. However, the order of items is important--as in equipment assembly steps, for instance. The browser accordingly displays each item in the list preceded by an ascending number. [<ol>, 7.2.1]

    Definition lists are slightly more complicated than unordered and ordered lists. Within a definition list's enclosing <dl> and </dl> tags, each list item has two parts, each with a special tag: a short name or title, contained within a <dt> tag, followed by its corresponding value or definition, denoted by the <dd> tag (XHTML includes respective end tags). When the tags are rendered, the browser usually puts the item name on a separate line (although not indented), and the definition, which may include several paragraphs, indented below it. [<dl>, 7.5.1]

    The various types of lists may contain nearly any type of content normally allowed in the body of the document. So you can organize your collection of digitized family photographs into an ordered list, for example, or put them into a definition list complete with text annotations. The markup language standards even let you put lists inside of lists (nesting), opening up a wealth of interesting combinations.

    2.9.2  Searchable Documents and Forms

    The original type of user interaction provided by early versions of HTML still available today, though deprecated in the standards, is an <isindex>-based searchable document. The browser provides some way for the user to type one or more words into a text input box and to pass those keywords to a related processing application on the server.* Obviously, searchable documents are very, very limited--one per document and only one user-input element. Fortunately, HTML and XHTML provide better, more extensive support for collecting user input through forms. [<isindex>, 6.6.1] [<form>, 9.2]

    You can create one or more special form sections in your document, bounded with the <form> and </form> tags. Inside the form, you may put predefined as well as customized text-input boxes allowing for both single and multiline input. You may also insert checkboxes and radio buttons for single- and multiple-choice selections and special buttons that work to reset the form or send its contents to the server. Users fill out the form at their leisure, perhaps after reading the rest of the document, and click a special send button that makes the browser send the form's data to the server. A special server-side program you provide then processes the form and responds accordingly, perhaps by requesting more information from the user, modifying subsequent documents the server sends to the user, and so on. [<form>, 9.2]

    Forms provide everything you might expect of an automated form, including input area labels, integrated contents for instructions, default input values, and so on--except automatic input verification, such as to check for the correct number of digits in a zip code or phone number, for instance; your server-side program or client-side JavaScripts need to perform that function.

    More HTML Articles
    More By O'Reilly Media


       · This article is an excerpt from the book "HTML & XHTML: The Definitive Guide, Sixth...
     

    Buy this book now. This article is excerpted from chapter two of HTML & XHTML: The Definitive Guide, Sixth Edition, written by Chuck Musciano and Bill Kennedy (O'Reilly; ISBN: 0596527322). Check it out today at your favorite bookstore. Buy this book now.

    HTML ARTICLES

    - Tabular Database Forms with HTML
    - Using the Find Functions for HTML Database F...
    - Sorting for Database Forms with HTML
    - Edit and Other Database Form Functions with ...
    - More Database Form Functions with HTML
    - Database Form Functions with HTML
    - Using the HTML Table Element as a Recordset
    - Building Single Row Database Forms with HTML
    - Introduction to Database Forms with HTML
    - Another Look at Animation of Geographical Ma...
    - Animation of Geographical Map Regions
    - Changing and Moving Pictures with CSS
    - Clickable Geographical Map Regions
    - Gradient Creation with the HR Element
    - Text on HTML Images: Do it Yourself







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway