Results 1 to 3 of 3

Thread: What does this mean?

  1. #1
    Join Date
    Jun 2005
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default What does this mean?

    What does Cellpadding, cellspacing and border means??? Anyone knows pls tell me. Thanks a lot.


    <table width="300" border="1" cellspacing="0"
    cellpadding="2" border="0">

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    They're simply table formatting attribues. You can try changing the values to see how it affects your table. See this page for more info: http://www.yourhtmlsource.com/tables/basictables.html

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by huisoonsg
    What does Cellpadding, cellspacing and border means??? Anyone knows pls tell me.
    The HTML Specification gives pretty clear definitions for each of these attributes.

    Essentially the cellpadding and cellspacing attributes affect cell margins - the amount of space between the edges of cells and their content, and the distance between adjacent cells, respectively. The border attribute affects the width of table borders. Other attributes dictate how borders are rendered.

    Though these attributes haven't been deprecated, you can achieve more control using CSS.

    <table width="300" border="1" cellspacing="0"
    cellpadding="2" border="0">
    As an aside, that snippet is invalid as it contains two identical attributes - border in this case. An attribute can only be included once in any particular starting tag.

    Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •