SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Location
    Utrecht (Netherlands, the)
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Validation trouble with link tag

    I'm trying to validate the following code and it fails on the first link tag:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    	<head>
    		<title>Validation Test</title>
    		<link rel="stylesheet" type="text/css" href="/style/menu.css" />
    		<link rel="stylesheet" type="text/css" href="gui.css" />
    	</head>
    	<body>
    		<p>test</p>
    	</body>
    </html>
    Could anyone explain this to me?
    Hippopotomonstrosesquippedaliophobia - Fear of long words

  2. #2
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Sure. You've used X(HT)ML-style self-closing tags ( />) with an HTML 4.0 DOCTYPE.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Location
    Utrecht (Netherlands, the)
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Aah. So simple . Thanks!

    What about validation errors from text within pre or code tags? How does one solve that?
    Hippopotomonstrosesquippedaliophobia - Fear of long words

  4. #4
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by CadmiumNL
    What about validation errors from text within pre or code tags? How does one solve that?
    Not sure what you mean there. Are you talling about publishing code snippets with XHTML-style closing tags? Got an example we could look at?

  5. #5
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by CadmiumNL
    What about validation errors from text within pre or code tags? How does one solve that?
    Convert your offending characters to HTML entities (for example, < and > to &lt; and &gt;, respectively).

  6. #6
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Location
    Utrecht (Netherlands, the)
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Egor
    Not sure what you mean there. Are you talling about publishing code snippets with XHTML-style closing tags? Got an example we could look at?
    I was talking about sample code in pre or code tags, in this case javascript. An example I got:

    Code:
    cannot generate system identifier for general entity "arg2".
    
    RpcObj1.send("/cgi-bin/mijnApplicatie?arg1=test&arg2=nogeentest");
    But I think vgarcia is right, I should probably convert & to &amp; or the numeric equivalent.
    Hippopotomonstrosesquippedaliophobia - Fear of long words

  7. #7
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Location
    Utrecht (Netherlands, the)
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, that did the trick. Thanks again!
    Hippopotomonstrosesquippedaliophobia - Fear of long words


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
  •