HTML
  Home arrow HTML arrow Page 4 - Beginning 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  
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

Beginning HTML
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2008-01-08

    Table of Contents:
  • Beginning HTML
  • Formatting HTML Documents
  • Inserting a Line Break
  • Comments
  • Formatting Text

  • 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


    Beginning HTML - Comments


    (Page 4 of 5 )

    You will notice in the above coding sample a line that says <! I am a comment! The computer does not see me tee-hee!>. This is known as a comment line. When the browser sees the <! > it turns a blind eye to whatever is in the comment tag and does not read it.

    Comments are used to remind yourself and to tell other programmers the purpose of specific pieces of code. That way when you look at your code a year later or the person who replaces you looks at it, they understand more easily what you were trying to accomplish should a problem arise or a modification be needed. They aren't necessary, but it is considered good programming practice to include them.

    Horizontal Rules!

    If this weren't a pg-13 audience I might take the time to explain that. Horizontal rules are a good way to separate lists of data or sections of documents. Basically, it inserts a line like the one below:

     


     

    To insert a horizontal rule, just use the <hr> tag.

    Aligning

    To align text, observe the following code:


    <html>

    <body>


    <h1 align="center">This is heading 1</h1>


    <p align="right">This paragraph is right aligned </p>

    <p>This paragraph is left aligned by default </p>

    <p align="center">This paragraph is centered</p>

    </body>

    </html>

    This gives us the following output:

    This is heading 1

    This paragraph is right aligned

    This paragraph is left aligned by default

    This paragraph is centered

    Changing the Color of Your Background

    Changing the color of your background is pretty simple also. Look at this code:


    <html>

    <body bgcolor="purple">

    <h1>Example of a colored background</h1>

    </body>

    </html>

    This will change your background to purple. If you want it red, replace the word purple with red, etc. We will go over the available colors and color codes later on in this tutorial.

    More HTML Articles
    More By James Payne


       · Hey thanks for dropping by to check out my article on Beginning HTML, in which we...
     

    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