HTML
  Home arrow HTML arrow Page 2 - HTML Tips
IBM developerWorks
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  
Actuate Whitepapers 
Moblin 
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

HTML Tips
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    HTML Tips - Text


    (Page 2 of 5 )

    Paragraphs

    If you have text made of paragraphs, make each paragraph the content of a P element. This way you can give each paragraph consistent formatting. This policy can also be helpful when you want to create a template for a web page.

    When to use Preformatted Text

    Scientific analysis, such as mathematical solutions and programming code (segments), are usually presented in a particular format. A lot of white space is used with such presentation. Put this type of presentation within the content of the PRE element. Any arrangement of text in the PRE element appears on the web page exactly as it is in the PRE element. Other examples of what you can put in the PRE element are poems and lyrics of songs. The following example shows how a mathematical solution is preformatted:


    <pre>

    <b>Example</b>

    Find the LCM of 36, 54, 60 and 80.


    <b>Solution</b>

    36 = 2 X 2 X 3 X 3

    54 = 2 X 3 X 3 X3

    60 = 2 X 2 X 3 X 5

    80 = 2 X 2 X 2 X 2 X 5


    LCM = 2 X 2 X 2 X 2 X 3 X 3 X 3 X 5

    = 16 X 27 X 5

    = <u>720</u>

    </pre>


    On a web page this will appear as follows:


    Example

    Find the LCM of 36, 54, 60 and 80.

    Solution

    36 = 2 X 2 X 3 X 3

    54 = 2 X 3 X 3 X3

    60 = 2 X 2 X 3 X 5

    80 = 2 X 2 X 2 X 2 X 5


    LCM = 2 X 2 X 2 X 2 X 3 X 3 X 3 X 5

    = 16 X 27 X 5

    = 720


    Note that the PRE element can have other elements, such as the Bold and Underline elements.

    Also note: the horizontal tab character is usually interpreted by browsers as the smallest non-zero number of spaces necessary to line characters up along tab stops that are every 8 characters. I strongly discourage you from using horizontal tabs in preformatted text because this would lead to misaligned documents.

    Increasing Vertical Spaces

    The Line Break element causes the next element to appear on the next line. A line break at the beginning of a block creates a blank line at the beginning of the block. You can increase the vertical space in a block using the line break "<br />" element.

    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...
     

    HTML ARTICLES

    - 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
    - Custom Buttons in HTML
    - Quick Web Page Menu
    - Maximizing and Restoring HTML Images with th...
    - Maximizing and Restoring HTML Images with th...
    - Handling Hyperlinks and Images in HTML
    - Quick Start with HTML
    - HTML Tips


    Iron Speed





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