HTML
  Home arrow HTML arrow HTML Formatting and Colors
Iron Speed
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  
Download TestComplete 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
IBM Rational Software Development Conference
 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 Formatting and Colors
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2008-01-15

    Table of Contents:
  • HTML Formatting and Colors
  • Quotation, Acronyms, And More
  • Writing Backwards
  • Handing Out Citations
  • Background
  • Color Code Chart

  • 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

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    HTML Formatting and Colors
    (Page 1 of 6 )

    In our last tutorial we left off discussing some basic HTML formatting. In this episode we will continue our discussion of formatting and get into working with Entities. There’s a lot to cover, so let’s get busy.

    Last article I showed you a table with some text formatting. Here is another table displaying even more ways to format text:

     

    Tag

    What it Does

    Example

    Result

    <code>

    Creates computer code text

    <code>Hello</code>

    Hello

    <kbd>

    Creates keyboard text

    <kbd>Hello</kbd>

    Hello

    <samp>

    Creates sample computer code text

    <samp>Hello</samp>

    Hello

    <var>

    Creates variable text

    <var>Hello</var>

    Hello

    <pre>

    Creates Preformatted text, which does not delete text or line breaks created by the user without tags.

    <pre>Hello how are you doing

    good

    friend</pre>

    Hello how are

    you doing

    good

    friend

    The above examples are used mostly to display examples of programming code, except the Preformatted tag <pre>, which is also used for formatting regular documents.

    Consider this example:


    <html>

    <body>


    <p>This is an example of what happens to white

    space and

    line breaks in HTML </p>

    </body>

    </html>

    This is what happens when this code is translated by an Internet browser:

      This is an example of what happens to white space and line breaks in HTML

    As you can see, if there is more than one space between words, HTML is courteous enough to delete it for you. To prevent this innate courteousness, you can use the Preformatted tag <pre>. Check out this code:


    <html>

    <body>


    <pre>This is an example of what happens to white

    space and

    line breaks in HTML </pre>

    </body>

    </html>

    As you can see it is essentially the same text, except that I replaced the <p> tags with the <pre> tags. Here is how this new code will be interpreted by the browser:

      This is an example of what happens to white

      space and

      line breaks in HTML

    More HTML Articles
    More By James Payne


       · Thanks for dropping by. In this tutorial we discuss formatting and colors, working...
     

    HTML ARTICLES

    - 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
    - Color Composition and HTML
    - HTML Fonts, Styles, and Headers
    - Uses of the New Window Command for Web Sites
    - HTML Working with Images
    - HTML: Working with Special Characters
    - HTML Forms
    - HTML Tables






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