www.webdeveloper.com
Results 1 to 13 of 13

Thread: Trying to validate my page 2

  1. #1
    Join Date
    Feb 2004
    Posts
    1,345

    Trying to validate my page 2

    Hi there.

    I'm trying to validate my page. I'm suing:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    I have a few errors that I have no idea how to fix. Here it is:

    character "&" is the first character of a delimiter but occurred as data:
    shows & gigs without.... (plain text)

    there is no attribute "name":
    <form name="login" action="index.asp" method="post">

    document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag:
    <input type="text" name="username" value="username" /><br />

    document type does not allow element "br" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag:
    ...="password" name="username" value="password" /><br />



    Hope you can help.

    Thanks!

  2. #2
    Join Date
    Sep 2004
    Posts
    398
    i think i know one thing, in xhtml instead of name you use id.

  3. #3
    Join Date
    Feb 2004
    Posts
    1,345
    Didn't work too well...

  4. #4
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    I would suggest that you simply use HTML 4.01 Strict.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  5. #5
    Join Date
    Feb 2004
    Posts
    1,345
    why? What's the difference?

  6. #6
    Join Date
    Mar 2004
    Posts
    3,081
    replace your "&" with
    Code:
    &amp;amp;
    I'm thuper, thanks for asking.

    It lives! http://www.stephenphilbin.com/ (Well it kinda' does anyway).
    My portable colour selection tool

  7. #7
    Join Date
    Aug 2003
    Location
    In my house
    Posts
    4,004

    Re: Trying to validate my page 2

    Originally posted by weee
    character "&" is the first character of a delimiter but occurred as data:
    shows & gigs without.... (plain text)
    In XHTML, & must be written out as &amp;amp;.

    Originally posted by weee
    there is no attribute "name":
    <form name="login" action="index.asp" method="post">
    In XHTML, the NAME attribute has been deprecated. Use ID instead.

    Originally posted by weee
    document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag:
    <input type="text" name="username" value="username" /><br />
    Elements within a FORM must be enclosed within a block-level element. The most common being a DIV:

    <form action="" method="">
    <div>
    <!-- form stuff here -->
    </div>
    </form>

    Or a FIELDSET:

    <form action="" method="">
    <fieldset>
    <legend>Form</legend>
    <!-- form stuff here -->
    </fieldset>
    </form>


    Originally posted by weee
    document type does not allow element "br" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag:
    ...="password" name="username" value="password" /><br />
    Same as above.


    However, I agree with Charles that you should just use HTML 4.01 Strict.

  8. #8
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    Originally posted by weee
    why? What's the difference?
    XHTML has all kinds of little differences with HTML. If you don't really know what you are doing you can cause all kinds of trouble.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  9. #9
    Join Date
    Feb 2004
    Posts
    1,345

    Can you guys explain it to me...

    why do I need to use:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

    And wht's the difference between them?
    When do I need to use with each on of'em?

    Thanks!

  10. #10
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    Do you really mean that you don't know the first thing about HTML - and the DOCTYPE is the first thing - and you're trying to use XHTML?

    Read, mark, learn an inwardly digest http://www.w3.org/TR/html4/ . And stick to HTML until you have done the same with http://www.w3.org/TR/2004/REC-xml-20040204/ and http://www.w3.org/TR/xhtml1/ .
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  11. #11
    Join Date
    Feb 2004
    Posts
    1,345

    OK now...

    I guess I'm going to use this:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

    Do I still need to make BR tags like that: <br /> (including "img src" tags as well?

    What do I need to do with that?

    document type does not allow element "BR" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag:
    <input type="text" name="username" value="username"><br>

    document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag:
    <input type="password" name="username" value="password"><br>

    Thanks!

  12. #12
    Join Date
    Aug 2003
    Location
    In my house
    Posts
    4,004

    Re: Re: Trying to validate my page 2

    Originally posted by Paul Jr
    Elements within a FORM must be enclosed within a block-level element. The most common being a DIV:

    <form action="" method="">
    <div>
    <!-- form stuff here -->
    </div>
    </form>

    Or a FIELDSET:

    <form action="" method="">
    <fieldset>
    <legend>Form</legend>
    <!-- form stuff here -->
    </fieldset>
    </form>


  13. #13
    Join Date
    Feb 2004
    Posts
    1,345

    I don't know what...

    "<!-- form stuff here -->" - suppose to be.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles