Results 1 to 8 of 8

Thread: HTML 4.01 Strict Table Errors

  1. #1
    Join Date
    Jan 2008
    Location
    Los Angeles
    Posts
    97
    Thanks
    31
    Thanked 2 Times in 2 Posts

    Default HTML 4.01 Strict Table Errors

    Using HTML 4.01 Strict, I get errors on http://validator.w3.org in the table widths and heights. I checked the language online here http://www.w3.org/TR/REC-html40/struct/tables.html and I can't understand why.

    These are the errors:

    1. there is no attribute "HEIGHT".
    <table width="1200" height="231"cellpadding="0" cellspacing="0" border="0">

    2. there is no attribute "WIDTH".
    <tr><td width="1200" align="left">

    3. there is no attribute "HEIGHT".
    <tr height="53"valign="bottom">

    4. there is no attribute "BGCOLOR".
    <table width="990" height="330" bgcolor="#ffffff" cellpadding="0" cellspacing="0

    Thanks!
    Last edited by questions; 08-05-2008 at 06:23 PM.

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Those attributes aren't supported in the WC3 HTML 4.01 Strict standard. You should be using CSS to declare those attributes.

    Code:
    table {
       height:231px;
       width:1200px
       background-color:#fff;
    }
    td {
       width:1200px;
       text-align:left;
    }
    tr {
       height:53px;
       vertical-align:bottom;
    }

  3. The Following User Says Thank You to Medyman For This Useful Post:

    questions (08-05-2008)

  4. #3
    Join Date
    Jan 2008
    Location
    Los Angeles
    Posts
    97
    Thanks
    31
    Thanked 2 Times in 2 Posts

    Default

    Cool! Thank you! I was starting to think that...

  5. #4
    Join Date
    Jan 2008
    Location
    Los Angeles
    Posts
    97
    Thanks
    31
    Thanked 2 Times in 2 Posts

    Default

    And if you have two or more tables, do you do something like this:

    CSS
    table.table1 {
    height:231px;
    width:1200px
    background-color:#fff;
    }
    td.table1 {
    width:1200px;
    text-align:left;
    }
    tr.table1 {
    height:53px;
    vertical-align:bottom;
    }

    HTML
    <table class="table1">
    <tr>
    <td>content</td>
    </tr>
    </table>

    And if you have more than one row or cell size you give each one a tag?
    td.table1row1
    etc.?

    Thanks!

  6. #5
    Join Date
    Jan 2008
    Location
    Los Angeles
    Posts
    97
    Thanks
    31
    Thanked 2 Times in 2 Posts

    Default

    I've decided to define them as classes like this. Couldn't figure it out any other way.

    CSS
    .menutable {
    height: 240x;
    width: 1035px
    background: #fff;
    }
    .menurow {
    height: 60px;
    vertical-align: top;
    }
    .menucell {
    width: 207px;
    text-align: right;
    }

    HTML
    <table class="menutable" border="0" cellpadding="0" cellspacing="0">
    <tr class="menurow">
    <td class="menucell"><a href="border/border.shtml" id="menu-border">&nbsp;</a></td>

  7. #6
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    that's the best way to do it. If you want to define different things for each, then you should give them each classes and code the css correspondingly
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  8. #7
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Don't miss highlighted:
    Code:
    .menutable {
    height: 240x;
    width: 1035px;
    background: #fff; 
    }
    You'll have unfavorable result.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  9. #8
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    Not if it spans multiple lines.
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

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
  •