W3C Validation: Finding new methods for old HTML codes

Discussion in 'HTML' started by news frontiernet.net, Aug 12, 2004.

  1. I am trying to find new methods to code that will validate with the W3C
    HTML validator in strcit mode.

    The W3C Validator in strict mode rejects these markups

    Table height ( must I style, ID or class each table?)
    Table border( same ?)
    img border ( must I style, ID or class each image?)
    img lowsrc ( what replaces this in CSS? I find this very helpful but where
    is it in CSS?)
    img align
    img hspace ( i have tried using css padding but not found anything that
    seems to ne reliabler?)
    img vspace
    a target ( what replaces this in CSS?)
    hr color
    hr width
    hr size

    Is there a document somewhere that would give me some help rerplacing old
    codes with new CSS attributes? I have searched for one, but so far it eludes
    me.
     
    news frontiernet.net, Aug 12, 2004
    #1
    1. Advertising

  2. news frontiernet.net

    Mark Parnell Guest

    On Thu, 12 Aug 2004 22:32:28 GMT, "news frontiernet.net"
    <> declared in alt.html:

    > I am trying to find new methods to code that will validate with the W3C
    > HTML validator in strcit mode.


    Did you try reading the specs?
    http://www.w3.org/TR/html4/
    http://www.w3.org/TR/CSS21/

    > Table height ( must I style, ID or class each table?)


    Just don't specify a height at all. The height of the table will be
    adjusted automatically according to the content. Unless you're using
    tables for layout, of course. In which case the answer is don't.
    http://www.allmyfaqs.com/faq.pl?Tableless_layouts

    > Table border( same ?)


    That depends. If you want all tables to have no border (or the same
    border), you don't need to apply a class or ID. If you want it different
    for each table, then yes. But how many different types of tables could
    one site have?

    > img border ( must I style, ID or class each image?)


    Again, you can set it for all images, or if you want it to be different
    for different images, a class or ID is needed.

    > img lowsrc ( what replaces this in CSS? I find this very helpful but where
    > is it in CSS?)


    AFAICT that has never been part of any HTML specs. Besides, it is about
    content, not presentation, so has nothing to do with CSS.

    > img align


    CSS: text-align (or possible float, depending on exactly what you are
    trying to do)

    > img hspace ( i have tried using css padding but not found anything that
    > seems to ne reliabler?)
    > img vspace


    For both either margin or padding, depending on whether you want it
    inside or outside the border.

    > a target ( what replaces this in CSS?)


    Nothing. You shouldn't be using it at all.

    > hr color


    CSS: border-color

    > hr width


    CSS: width

    > hr size


    CSS: border-width

    > Is there a document somewhere that would give me some help rerplacing old
    > codes with new CSS attributes? I have searched for one, but so far it eludes
    > me.


    Fairly basic, but all I could find after a quick search:
    http://css.nu/articles/translate.html

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
     
    Mark Parnell, Aug 13, 2004
    #2
    1. Advertising

  3. news frontiernet.net

    Adrienne Guest

    Gazing into my crystal ball I observed "news frontiernet.net"
    <> writing in news:0eSSc.975$:

    > I am trying to find new methods to code that will validate with the
    > W3C HTML validator in strcit mode.
    >
    > The W3C Validator in strict mode rejects these markups
    >
    > Table height ( must I style, ID or class each table?)


    IMHO, table height should be whatever height the table needs to be, unless
    of course, you're using (abusing) it for layout

    > Table border( same ?)


    table {border:thin solid #000;} /* puts a border around the table */


    > img border ( must I style, ID or class each image?)


    img (border:0;} /* or if you want a border, then put one */
    > img lowsrc ( what replaces this in CSS? I find this very helpful but
    > where is it in CSS?)


    none - that's a proprietary attribute that is not part of the HTML 4 spec

    > img align


    img {float:left;} /* floats an image to the left */

    > img hspace ( i have tried using css padding but not found anything that
    > seems to ne reliabler?)


    img {margin:1em;} /* puts a 1em margin around the entire image, change to
    suit */

    > img vspace


    See above

    > a target ( what replaces this in CSS?)


    No such thing, and there's good reason for it. If the user wants to open a
    link in a new window, that's up to the user, not you.

    > hr color
    > hr width
    > hr size


    hr {color:#000; background-color:#000; width:50%; height:2px;}

    >
    > Is there a document somewhere that would give me some help rerplacing
    > old codes with new CSS attributes? I have searched for one, but so far
    > it eludes me.
    >
    >


    When I started using CSS, I found http://www.blooberry.com/indexdot/css
    very helpful. Of course, you can always check the specs,
    http://www.w3.org/TR/REC-CSS1 and http://www.w3.org/TR/REC-CSS2/ .



    --
    Adrienne Boswell
    Please respond to the group so others can share
    http://www.arbpen.com
     
    Adrienne, Aug 13, 2004
    #3
  4. news frontiernet.net

    Sam Hughes Guest

    "news frontiernet.net" <> wrote in
    news:0eSSc.975$:

    > I am trying to find new methods to code that will validate with the
    > W3C HTML validator in strcit mode.
    >
    > The W3C Validator in strict mode rejects these markups
    > Table height ( must I style, ID or class each table?)


    CSS has a height property.

    > Table border( same ?)


    CSS has a border property. To emulate border="1" you can use
    table {
    border: 1px outset #777;
    }
    td {
    border: 1px inset #777;
    }

    > img border ( must I style, ID or class each image?)


    the border property again.

    > img lowsrc ( what replaces this in CSS? I find this very helpful but
    > where is it in CSS?)


    The lowsrc attribute is useless in terms of bandwidth; it will actually
    increases bandwidth use.

    > img align


    float property.

    > img hspace ( i have tried using css padding but not found anything
    > that seems to ne reliabler?)
    > img vspace


    margin properties

    > a target ( what replaces this in CSS?)


    A replacement might exist in the future, but none exists now. However,
    that doesn't mean you should use javascript in order to validate. That
    is a tool, not an end in itself, and using the target attribute instead
    of javascript is a good idea.

    However, usually, opening new windows annoys visitors, if you are using
    it for something like links to external sites. But I must give you the
    benefit of the doubt.

    > hr color


    This only works in Internet Explorer, anyway. You can use border color
    or background color to acheive the same or better effects.

    > hr width


    CSS has a width property.

    > hr size


    CSS has a height property.

    > Is there a document somewhere that would give me some help rerplacing
    > old codes with new CSS attributes? I have searched for one, but so far
    > it eludes me.


    I have half a mind to write one, and it may be based on this post.

    --
    How to make it so visitors can't resize your fonts:
    <http://www.rpi.edu/~hughes/www/wise_guy/unresizable_text.html>
     
    Sam Hughes, Aug 13, 2004
    #4
  5. news frontiernet.net

    Mark Parnell Guest

    On 12 Aug 2004 23:36:51 GMT, Sam Hughes <> declared in
    alt.html:

    > I have half a mind to write one, and it may be based on this post.


    Please do - I couldn't find a decent one when I searched. :)

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
     
    Mark Parnell, Aug 13, 2004
    #5
  6. news frontiernet.net

    Neal Guest

    On Thu, 12 Aug 2004 22:32:28 GMT, news frontiernet.net
    <> wrote:


    > hr color
    > hr width
    > hr size



    Instead of hr, use a border of a div. hr really isn't very content-ish,
    actually. If you absolutely need one even with CSS off, I'd style a div
    border and set the hr to display:none for the CSS rendering. When there's
    no CSS the hr will be visible, when there is the border of the div will be.
     
    Neal, Aug 13, 2004
    #6
  7. news frontiernet.net

    Spartanicus Guest

    "news frontiernet.net" <> wrote:

    >The W3C Validator in strict mode rejects these markups
    >
    >Table border


    Incorrect, the border attribute on the <table> element is not
    deprecated. Table borders can be considered structural in certain
    circumstances. There's also a presentational advantage of expressing it
    in HTML: UAs typically draw prettier borders adjusted to the background.

    --
    Spartanicus
     
    Spartanicus, Aug 13, 2004
    #7
  8. news frontiernet.net

    Sam Hughes Guest

    Neal <> wrote in
    news:eek::

    > On Thu, 12 Aug 2004 22:32:28 GMT, news frontiernet.net
    > <> wrote:
    >
    >
    >> hr color
    >> hr width
    >> hr size

    >
    >
    > Instead of hr, use a border of a div. hr really isn't very
    > content-ish, actually. If you absolutely need one even with CSS
    > off, I'd style a div border and set the hr to display:none for the
    > CSS rendering. When there's no CSS the hr will be visible, when
    > there is the border of the div will be.


    Why? That is just backward.

    Since you already agree to include the horizontal rule, you may as
    well have it be visible; it means much more as a generic separator
    than does a div's border.

    --
    How to make it so visitors can't resize your fonts:
    <http://www.rpi.edu/~hughes/www/wise_guy/unresizable_text.html>
     
    Sam Hughes, Aug 13, 2004
    #8
  9. news frontiernet.net

    Sam Hughes Guest

    Spartanicus <> wrote in
    news:.
    ie:

    > Table borders can be considered structural in certain circumstances.


    Are cellpadding and cellspacing structural as well?

    --
    How to make it so visitors can't resize your fonts:
    <http://www.rpi.edu/~hughes/www/wise_guy/unresizable_text.html>
     
    Sam Hughes, Aug 13, 2004
    #9
  10. news frontiernet.net

    Spartanicus Guest

    Sam Hughes <> wrote:

    >> Table borders can be considered structural in certain circumstances.

    >
    >Are cellpadding and cellspacing structural as well?


    I can't think of an example where that would apply, but maybe.

    It's more clear with regard to the also not deprecated align and valign
    cell attributes. It's easy to think of an example where the visual
    structure of the data in a table needs these attributes and they
    therefore should not be replaced by (optional) css.

    --
    Spartanicus
     
    Spartanicus, Aug 13, 2004
    #10
  11. news frontiernet.net

    Karl Groves Guest

    "news frontiernet.net" <> wrote in message
    news:0eSSc.975$...
    > I am trying to find new methods to code that will validate with the W3C
    > HTML validator in strcit mode.
    >
    > The W3C Validator in strict mode rejects these markups
    >
    > Table height ( must I style, ID or class each table?)


    CSS

    > Table border( same ?)


    CSS

    > img border ( must I style, ID or class each image?)


    CSS

    > img lowsrc ( what replaces this in CSS? I find this very helpful but where


    If your picture is too big, make it smaller.

    > is it in CSS?)
    > img align


    CSS

    > img hspace ( i have tried using css padding but not found anything that
    > seems to ne reliabler?)


    CSS (margin)

    > img vspace


    CSS

    > a target ( what replaces this in CSS?)


    Are you using frames?
    If not, then stop abusing the attribute. Opening new windows is abusing your
    visitor

    > hr color


    CSS

    > hr width


    CSS

    > hr size


    CSS

    >
    > Is there a document somewhere that would give me some help rerplacing old
    > codes with new CSS attributes? I have searched for one, but so far it

    eludes
    > me.


    Google is your friend.



    --
    Karl Core

    Link of the day: http://216.127.86.74/dubyaresume.com/

    http://www.karlcore.com
    http://www.usabilityinfo.com
    http://www.murderthestupid.com
     
    Karl Groves, Aug 13, 2004
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Greg  --
    Replies:
    4
    Views:
    2,173
  2. Frank
    Replies:
    9
    Views:
    1,573
    David Dorward
    May 3, 2004
  3. Replies:
    2
    Views:
    2,848
    Malcolm
    Aug 20, 2005
  4. Allen
    Replies:
    1
    Views:
    659
    Mark Rae [MVP]
    Dec 3, 2007
  5. John Henry
    Replies:
    24
    Views:
    1,018
    alex23
    May 30, 2008
Loading...

Share This Page