Home arrow HTML arrow Page 6 - HTML Tutorial
HTML

HTML Tutorial


This article is the September contest winner. The author provides a basic tutorial of HTML, with code samples illustrating headings, lists, background colors, using the Frame tag and more.

Author Info:
By: Anand Narayanaswamy
Rating: 4 stars4 stars4 stars4 stars4 stars / 77
October 11, 2004
TABLE OF CONTENTS:
  1. · HTML Tutorial
  2. · Paragraph Tags, Attributes and Headings
  3. · Using Lists
  4. · Indents and Links
  5. · Working with Images
  6. · Working with Tables
  7. · Working with Frames
  8. · Using Forms, Text, Buttons, and Combo Box
  9. · Text Area, Check Box, and Radio Buttons
  10. · Additional Tags
  11. · Drawing Lines, SUB and SUP Tags
  12. · Test Yourself Questions

print this article
SEARCH DEVARTICLES

HTML Tutorial - Working with Tables
(Page 6 of 12 )

One of the unique features of HTML is its ability to create tables. A developer can easily convert the required data into a table format using <TABLE>, <TR>, <TH> and <TD> tags. First, you should create a heading using <TH> tag and then rows are to be created one by one by applying <TR> tag as shown in Listing

Listing 15

    <TABLE>
    <TR><TH>Sl No:</TH><TH>Name</TH>
    <TR><TD>1</TD><TD>Mark </TD>
    <TR><TD>2</TD><TD>Paul</TD>
    <TR><TD>3</TD><TD>Mike</TD>
    </TABLE>

Here, three rows and two columns are created. It is not necessary to close <TH> and <TD> tags. You can apply some modifications to the above code by applying the following attributes.

  1. border: Changes the border of the table. Default border is 1.
  2. bgcolor: Changes the background color of the table.
  3. align: Aligns the table to left, center, right. Default Alignment is left.
  4. CellPadding: It indicates the space between the border and content of the cell.
  5. CellSpacing: It indicates the space between two cells.

The attributes bgcolor and align are applicable to <TR> tag as well. For example, if you apply bgcolor like <TR bgcolor = "yellow">, only the background color of the row will be changed whereas if you apply it in TABLE tag, whole of the table will be of yellow color. Try this on your own in the labs.


blog comments powered by Disqus
HTML ARTICLES

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials