Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    1
    Thanks
    2
    Thanked 0 Times in 0 Posts

    which html version is this code

    Hi,

    I tried to open this code from my browser. It's not interprting it. Is it a new version of html code. or the format itself is wrong? can any one please help me out. thanks in advance


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm...;quot;>
    <html xmlns=”http://www.w3.org/1999/xhtml”>
    <head>
    <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
    <title>Sanke Photography</title>
    <link href=”main.css” rel=”stylesheet” media=”screen, projection” type=”text/css” />
    <link href=”print.css” rel=”stylesheet” media=”print” type=”text/css” />
    <!–[if IE ]>
    <link href=”iecss.css” rel=”stylesheet” media=”screen,projection” type=”text/css” />
    <![endif]–>
    </head>
    <body id=”home”>
    <div id=”outer”>
    <div id=”header”>
    <ul id=”nav”>
    <li><a href=”#”>About Us</a></li>
    <li><a href=”#”>Gallery</a></li>
    <li><a href=”#”>Contact Us</a></li>
    <li><a href=”#”>Events</a></li>
    <li><a href=”#”>News</a></li>
    </ul>
    <div id=”tagline”></div>
    <div id=”search”></div>
    </div>
    <div id=”main”>
    <div id=”col1″></div>
    <div id=”maincol”></div>
    <div id=”col2″></div>
    </div>
    </div>
    </body>
    </html>

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,474
    Thanks
    6
    Thanked 980 Times in 953 Posts
    That code is kinda messed up. Did you copy that from a rich text document (like Word or OpenOffice)? You have to replace all occurrences of &amp;lt; with <, all occurrences of &amp;gt; with >, and all occurrences of &amp;quot; and all “smart quotes” () with straight quotes ("), then it will work.

  • Users who have thanked VIPStephan for this post:

    jamesfunny (04-15-2011)

  • #3
    New Coder
    Join Date
    Apr 2011
    Posts
    36
    Thanks
    0
    Thanked 3 Times in 3 Posts
    It's standard XHTML 1.0 but it looks to have been passed through some type of filter to convert all the less than's and greater than's; <,>, to their html entities. Passing it through the html_entity_decode funtion in PHP should clear it up. If you don't know how let me know and I can throw something together for you.

    Edit:
    It was double encoded which is why your browser can't render it, the html entity for < is &lt;, and someone ran the encoded page through a second time encoding all the ampersands to &amp; making it even more convoluted. http://htmlhelp.com/reference/html40...s/special.html
    Last edited by munkeyboy; 04-15-2011 at 12:22 AM.

  • Users who have thanked munkeyboy for this post:

    jamesfunny (04-15-2011)


  •  

    Posting Permissions

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