View Full Version : which html version is this code

04-14-2011, 11:00 PM

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/xhtml1-strict.dtd">
<html xmlns=”http://www.w3.org/1999/xhtml”>
<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” />
<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>
<div id=”tagline”></div>
<div id=”search”></div>
<div id=”main”>
<div id=”col1″></div>
<div id=”maincol”></div>
<div id=”col2″></div>

04-15-2011, 12:37 AM
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.

04-15-2011, 01:19 AM
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.

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/entities/special.html