HTML
  Home arrow HTML arrow Page 2 - 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 - 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...
       · 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 4 Hosted by Hostway
    Stay green...Green IT