HTML
  Home arrow HTML arrow Page 3 - HTML Tips
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  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
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

HTML Tips
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2008-03-26

    Table of Contents:
  • HTML Tips
  • Text
  • Lists
  • Forms
  • Form Elements for Uploading Files

  • 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


    HTML Tips - Lists


    (Page 3 of 5 )

    Definition Lists

    You may be wondering what you will do with the Definition Lists (the DL, DT, DD elements). Well, you can use them for dialogs: the name of the speaker goes in the DT element and what he says goes in the DD element. The problem here is that you will use more vertical space than if you start the speech on the same line as the name of the speaker. If you want to present your work this way (to economize vertical space), then use Cascading Style Sheets. The following example illustrates the point:


    <DL>

    <DT>John</DT>

    <DD>I love you.<DD>


    <DT>Mary</DT>

    <DD>I love you too.</DD>


    <DT>John</DT>

    <DD>I like the way you walk.<br />

    I like the way you talk.<br />

    Above all, you are beautiful.

    </DT>

    <DT>Mary</DT>

    <DD>Are you sure?</DD>

    <DT>John</DT>

    <DD>Yes.</DD>

    </DL>


    On a web page, this will appear as follows:


    John

    I love you.

    Mary

    I love you too.

    John

    I like the way you walk.

    I like the way you talk.

    Above all, you are beautiful.

    Mary

    Are you sure?

    John

    Yes.


    You can also use the Definition Lists to give the meaning of words; the word goes in the DT element and the meaning goes in the DD element. Again the problem here is that you will use more vertical space than you would have if you presented your work as it is in the dictionary. To present your work as it is in the dictionary, you have to use Cascading Style Sheets.

    IMAGES

    Give Images Their Size

    You might have noticed that when you open certain web pages, it looks as if the text jumps downwards. If the browser does not know the size of your image, when the page is being rendered, it will start by giving very little space for it. When the image finally comes, it will have to push the text down to make space for it. To avoid this problem, inform the browser of the size of the image by indicating its width and height in the style sheet.

    ALIGNMENT

    The HR element

    The HR element draws a horizontal line. It would draw a line in a block element, such as BODY or DIV. You can use the horizontal line to give vertical visual separations to the content of a block. You can give any size you want to the line. Give the lines some nice colors where appropriate!

    The horizontal line without any style associated with it appears as a groove. By giving the line a foreground color (in the style sheet), this groove is usually removed.

    More HTML Articles
    More By Chrysanthus Forcha


       · If you are coding in HTML and you reach a point where you do not know how to...
       · Just a note here, using dt and dd to represent dialog can be very confusing to those...
     

    HTML ARTICLES

    - Comparing Browser Response to Active Client ...
    - Testing Browser Response to Active Client Pa...
    - Active Client Pages: Completing the Code for...
    - ACP and Browsers: Setting up an Example
    - How Browsers Respond to Active Client Pages
    - Completing a Tree with Active Client Pages
    - HTML Form Verification and ACP
    - Building an ACP Tree
    - Completing an ACP 3D HTML Table Image Gallery
    - Building an ACP 3D HTML Table Image Gallery
    - A Multiple Page Image Gallery with Active Cl...
    - Building an Image Gallery with Active Client...
    - Concluding a Menu for All Browsers
    - A Vertical Menu for All Browsers
    - Downloading Long HTML Pages with ACP







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT