XHTML Strict - Is this right?

Discussion in 'ASP .Net' started by Bobby Edward, Oct 4, 2008.

  1. Bobby Edward

    Bobby Edward Guest

    To use XHTML Strict all I have to do is...

    1. Add this to the top of my master page/ASPX page(s)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    2. Add this to my web.config "<system.web>" section
    <xhtmlConformance mode="Strict" />

    Correct????
    Bobby Edward, Oct 4, 2008
    #1
    1. Advertising

  2. Bobby Edward

    Bobby Edward Guest

    Bobby Edward, Oct 4, 2008
    #2
    1. Advertising

  3. Bobby Edward

    bruce barker Guest

    no, all the html and css you enter must follow the xhtml standard. you
    should run your pages thru a xhtml compliance tool (visual studio has a
    simple one, but it only checks the aspx source, not the rendered html).
    also 3rd party controls may not generate compliant html.


    -- bruce (sqlwork.com)



    Bobby Edward wrote:
    > To use XHTML Strict all I have to do is...
    >
    > 1. Add this to the top of my master page/ASPX page(s)
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    > "http://www.w3.org/TR/html4/strict.dtd">
    > 2. Add this to my web.config "<system.web>" section
    > <xhtmlConformance mode="Strict" />
    >
    > Correct????
    >
    >
    bruce barker, Oct 5, 2008
    #3
  4. Bobby Edward

    Hal Rosser Guest

    "Bobby Edward" <> wrote in message
    news:...
    > To use XHTML Strict all I have to do is...
    >
    > 1. Add this to the top of my master page/ASPX page(s)
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    > "http://www.w3.org/TR/html4/strict.dtd">
    > 2. Add this to my web.config "<system.web>" section
    > <xhtmlConformance mode="Strict" />
    >
    > Correct????


    There's a difference between HTML and XHTML.
    For one, XHTML is a type of XML document and has a DTD, but it is based on
    HTML 4.0
    Check with the W3C http://www.w3.org/MarkUp/#recommendations
    and here's a decent set of tutorials on both
    http://w3schools.com/
    Hal Rosser, Oct 5, 2008
    #4
  5. Bobby Edward wrote:
    > To use XHTML Strict all I have to do is...
    >
    > 1. Add this to the top of my master page/ASPX page(s)
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    > "http://www.w3.org/TR/html4/strict.dtd">
    > 2. Add this to my web.config "<system.web>" section
    > <xhtmlConformance mode="Strict" />
    >
    > Correct????
    >


    Not correct.

    That doctype tag is not an XHTML doctype, it's an HTML doctype. For an
    XHTML page you need an XHTML doctype.

    http://www.w3.org/QA/2002/04/valid-dtd-list.html


    --
    Göran Andersson
    _____
    http://www.guffa.com
    Göran Andersson, Oct 5, 2008
    #5
    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. Peter L.
    Replies:
    0
    Views:
    316
    Peter L.
    Oct 20, 2003
  2. Rob Roberts
    Replies:
    5
    Views:
    2,788
    Rob Roberts
    Jan 20, 2006
  3. Christopher R

    xhtml strict is being very stict why?

    Christopher R, Oct 1, 2003, in forum: HTML
    Replies:
    13
    Views:
    789
  4. Brendan

    Need help with strict XHTML

    Brendan, Nov 3, 2003, in forum: HTML
    Replies:
    4
    Views:
    388
    Brendan
    Nov 3, 2003
  5. Tom

    XHTML Strict and Script

    Tom, Nov 15, 2003, in forum: HTML
    Replies:
    6
    Views:
    656
    Woolly Mittens
    Nov 15, 2003
Loading...

Share This Page