SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Wizard
    Join Date
    Apr 2004
    Location
    dublin
    Posts
    2,036
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XHTML Validation Problem

    Hi all,

    When I validate my page for xhtml I get this error:

    Line 119, column 10: document type does not allow element "noscript" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

    <noscript></noscript>


    What does this mean? What can I do to fix it?

    Thanks.

    Kevin.

  2. #2
    SitePoint Evangelist figbeam's Avatar
    Join Date
    Jun 2004
    Location
    Sweden
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think it's saying that it will only accept a "noscript" tag inside any of "object", "applet", "map", "iframe", "button", "ins" or "del" tags, but not outside.

    I stumbled across this problem with the "a" tag because I was used to put an <a name="..."></a> before the relevant heading. The validator complained that you can only put an "a" tag within "p", "h1" etc. I had to change it to <h1><a name="...">some heading</a></h1>.

    It should make sense, because why use "noscript" in a place where it wasn't necessary in the first place.

  3. #3
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This code:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    	<head>
    		<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /><title> New Document </title>
    	</head>
    
    	<body>
    		<noscript></noscript>
    	</body>
    </html>
    validate fine for me so I have to think you have that noscript tag within something else but the body... do you?

  4. #4
    SitePoint Enthusiast MstrBob's Avatar
    Join Date
    Dec 2004
    Location
    New York City
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The NOSCRIPT element is a block-level element. Thus, if you have it inside an inline element like EM or SPAN, it won't work. Inline elements can't contain block elements.

  5. #5
    SitePoint Wizard
    Join Date
    Apr 2004
    Location
    dublin
    Posts
    2,036
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have it inside div tags. Is that the problem? Should I just put it outside the div tags?

    Thanks.

  6. #6
    SitePoint Zealot physt's Avatar
    Join Date
    Jul 2004
    Location
    Schenectady, NY
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That shouldn't be problem unless you have display: inline; on your div..

  7. #7
    SitePoint Enthusiast MstrBob's Avatar
    Join Date
    Dec 2004
    Location
    New York City
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The CSS display property won't affect the validity of a markup-document. Make sure that you NOSCRIPT isn't in an inline element. DIV is a block element, so that's fine.


Bookmarks

Posting Permissions

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