Standards

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Valid Site html section non validating in xhtml..

    6 answers - 931 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Yes, the Valid XHTML link code is not Valid with CSS.
    I have tweaked almost every page on all my clients sites to put
    validating code for both the HTML and CSS Validators.
    Non Valid code in xml docuents with css:
    <p>
    <a href=""><img
    src=""
    alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
    </p>
    Validating code through both the HTML and CSS Validators:
    <p>
    <a href=""><img
    style="border:0;width:88px;height:31px"
    src="" alt="Valid XHTML 1.0 Strict"
    /></a>
    <a href="">
    <img style="border:0;width:88px;height:31px"
    src=""
    alt="Valid CSS!" />
    </a>
    </p>
    Since I am always telling people that meeting "standards" is important,
    I figure giving you code snippet to ad to the option for a page that
    uses CSS as well can't hurt.
    Jaqui
  • No.1 | | 723 bytes | |

    Thu, Aug 10, 2006 at 02:18:20AM -0700, J. Greenlees wrote:
    Non Valid code in xml docuents with css:

    <p>
    <a href=""><img
    src=""
    alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
    </p>

    If I understand your argument correctly:

    The validity of some markup is dependent on the DTD specified in the
    Doctype, not the use (or otherwise) or a stylesheet.

    The height and width attributes exist for all published versions of
    XHTML, including Strict variants. Arguably, they belong there as they
    describe the image rather then define its presentation (at least so
    long as you use them to specify the actual pixel dimensions of the
    image).
  • No.2 | | 386 bytes | |

    Thursday 10 August 2006 16:38, David Dorward wrote:

    The height and width attributes exist for all published versions of
    XHTML, including Strict variants.

    Indeed.

    Arguably, they belong there as they
    describe the image rather then define its presentation

    But that's a poor argument. They are properties of the image,
    not of a page it appears in.
  • No.3 | | 1113 bytes | |

    David Dorward wrote:
    Thu, Aug 10, 2006 at 02:18:20AM -0700, J. Greenlees wrote:
    >Non Valid code in xml docuents with css:
    >>

    ><p>
    ><a href=""><img
    >src=""
    >alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
    ></p>


    If I understand your argument correctly:

    The validity of some markup is dependent on the DTD specified in the
    Doctype, not the use (or otherwise) or a stylesheet.

    The height and width attributes exist for all published versions of
    XHTML, including Strict variants. Arguably, they belong there as they
    describe the image rather then define its presentation (at least so
    long as you use them to specify the actual pixel dimensions of the
    image).

    Except that when validating against the XHTML Strict DTD the image width
    and height attributes cause a failed validation, since they are
    not included in the DTD attribute list for images.
    by putting them into a style statement the error goes away.
  • No.4 | | 740 bytes | |

    Thu, Aug 10, 2006 at 03:33:12PM -0700, J. Greenlees wrote:

    Except that when validating against the XHTML Strict DTD the image width
    and height attributes cause a failed validation, since they are
    not included in the DTD attribute list for images.
    by putting them into a style statement the error goes away.

    >From #a_dtd_XHTML-1.0-Strict


    <!ELEMENT img EMPTY>
    <!ATTLIST img
    %attrs;
    src %URI; #REQUIRED
    alt %Text; #REQUIRED
    longdesc %URI; #IMPLIED
    height %Length; #IMPLIED <
    width %Length; #IMPLIED <
    usemap %URI; #IMPLIED
    ismap (ismap) #IMPLIED
    >


    Width and height are definitely there.
  • No.5 | | 1011 bytes | |

    David Dorward wrote:
    Thu, Aug 10, 2006 at 03:33:12PM -0700, J. Greenlees wrote:

    >Except that when validating against the XHTML Strict DTD the image width
    >and height attributes cause a failed validation, since they are
    >not included in the DTD attribute list for images.
    >by putting them into a style statement the error goes away.


    >>From #a_dtd_XHTML-1.0-Strict


    <!ELEMENT img EMPTY>
    <!ATTLIST img
    %attrs;
    src %URI; #REQUIRED
    alt %Text; #REQUIRED
    longdesc %URI; #IMPLIED
    height %Length; #IMPLIED <
    width %Length; #IMPLIED <
    usemap %URI; #IMPLIED
    ismap (ismap) #IMPLIED

    Width and height are definitely there.

    Then why does validating it give errors if they are not in a style element?
    the errors came from the CSS validator, I know that the height and width
    attributes caused the failure in validation.
  • No.6 | | 263 bytes | |

    Thu, Aug 10, 2006 at 03:33:12PM -0700, J. Greenlees wrote:
    Except that when validating against the XHTML Strict DTD the image width
    and height attributes cause a failed validation
    No, they don't.
    %3A%2F%2Fdorward.me.uk%2Ftmp%2Fimage.html

Re: Valid Site html section non validating in xhtml..


max 4000 letters.
Your nickname that display:
In order to stop the spam: 0 + 0 =
QUESTION ON "Standards"

EMSDN.COM