HTML 4.01 Schema in VS2005

Discussion in 'ASP .Net' started by Fred Chateau, Jan 18, 2007.

  1. Fred Chateau

    Fred Chateau Guest

    Is there a problem with the HTML 4.01 schema in Visual Studio 2005?

    When I set the target schema for validation to HTML 4.01, I receive closing
    tag errors.

    Validation (HTML 4.01): Empty elements such as 'meta' must end with />.

    I do not believe that is the correct validation. Empty elements in HTML 4.01
    should not contain closing tags. Am I mistaken?
    Fred Chateau, Jan 18, 2007
    1. Advertisements

  2. re:
    Not all elements are subject to that.

    Some HTML element types allow authors to omit end tags (e.g., the P and LI element types).
    The HTML DTD indicates for each element type whether the end tag is required.

    Some HTML element types have no content.

    For example, the line break element BR has no content; its only role is to terminate a line of text.
    Such empty elements never have end tags.

    The Meta element, however, needs end tags because it should never be an empty element.
    Juan T. Llibre, Jan 18, 2007
    1. Advertisements

  3. Fred Chateau

    Fred Chateau Guest

    Thank you. I thought that was the case.

    My point still is that VS 2005 HTML 4.01 validation is requiring ALL tags to
    be closed, including break tags and image tags, in a manner similar to XHTML
    1.1 validation.

    Is it my installation or is this schema incorrect? (I am using VS 2005
    Standard Edition with SP-1.)
    Fred Chateau, Jan 18, 2007
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.