HTML
  Home arrow HTML arrow Page 3 - Learn to Use HTML Tables and DIV tags Quic...
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  
Moblin 
JMSL Numerical Library 
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

Learn to Use HTML Tables and DIV tags Quickly
By: Stephen Davies
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 26
    2007-11-21

    Table of Contents:
  • Learn to Use HTML Tables and DIV tags Quickly
  • Use of Table Style
  • The Use of the DIV tag
  • Combining the use of DIV and TABLE tags

  • 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


    Learn to Use HTML Tables and DIV tags Quickly - The Use of the DIV tag


    (Page 3 of 4 )

    Like tables, <DIV> tags allow for compositional treatment to the web page. There is a line break between <DIV> tags that allows for more spacing and composition, though that's okay. The idea is that you can style each <DIV> tag differently to suit your design. Style sheet coders like this idea as a mixture of styles can be introduced into the page.

    It looks like this when placed:

    The text is here.

    Or the text is here and looks like this.

    This is very basic but what is happening culminates in stylized block elements separated and therefore hosted properly. A table could be used with no borders, and simple changes to the font style. Combining DIV tags with tables, however, leads to a nice design.

    The code for the above example is:

    <html>

    <body>

    <div style="color:#00CC00;">The text is here</div>

    <div style="color:#000066;">Or the text is here and looks like this</div>

    </body>

    </html>

    That is just an illustration as the proper usage would look like this for a text section:


    <div style="background-color: #00CC00; text-align:center">

    <p> The text is here</p>

    </div>

    <div style="border:1px solid black">

    <p> This is a paragraph in a div section </p>

    </div>


    Another example of proper usage is with alignment in text:

    <div align="center">

    <h3>Hi, now the text is here</h3>

    <p><img src="somesillyimage.jpg">

    <h4>I know that the text can be here too and for <a href="http:www.somesite.org/">hyperlinks</a></h4>

    </div>

    So, the <div> tag will give many advantages to designers who are using styles more and wanting to move away from just plain tables. The <div> tag complements the style properties of a style sheet.

    More HTML Articles
    More By Stephen Davies


       · Doesn't work as presented, and the random beginner who knows enough to fix it...
       · bit negative.... which part does not work exactly?? tests showed it work, please...
       · I must be missing something. How can you explain how to use divs and tables...
     

    HTML ARTICLES

    - Completing Construction of a Database Form w...
    - Maximizing and Restoring Images in a Tabular...
    - Building the Recordset for an HTML Database ...
    - Laying Out a Database Form with HTML
    - Tabular Database Form Functions with HTML
    - Tabular Database Forms with HTML
    - Using the Find Functions for HTML Database F...
    - Sorting for Database Forms with HTML
    - Edit and Other Database Form Functions with ...
    - More Database Form Functions with HTML
    - Database Form Functions with HTML
    - Using the HTML Table Element as a Recordset
    - Building Single Row Database Forms with HTML
    - Introduction to Database Forms with HTML
    - Another Look at Animation of Geographical Ma...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT