eaglelegend Posted May 21, 2008 Share Posted May 21, 2008 http://validator.w3.org/check?uri=http%3A%2F%2Fwww.eaglelegend.com%2Findex.php%3Fmessage%3DYou%2520are%2520logged%2520out!%2520Please%2520log%2520back%2520in!&charset=(detect+automatically)&doctype=Inline&ss=1&outline=1&group=0&No200=1&verbose=1&st=1 Now why does it have them errors there? whats it want me to do? Quote Link to comment https://forums.phpfreaks.com/topic/106680-php-html-to-xhtml/ Share on other sites More sharing options...
abid786 Posted May 21, 2008 Share Posted May 21, 2008 Just for the first one: </td></tr><tr></table> </td> You have a closing-table tag before closing the table-row (<tr>) that you opened. Quote Link to comment https://forums.phpfreaks.com/topic/106680-php-html-to-xhtml/#findComment-546913 Share on other sites More sharing options...
eaglelegend Posted May 21, 2008 Author Share Posted May 21, 2008 I beleieve that is the footer: </td> </tr> <tr> <td colspan="2" bgcolor="#E73738" align="center"> <a href="http://validator.w3.org/check?uri=referer"> <img src="http://www.w3.org/Icons/valid-html401" border='0' alt="Valid HTML 4.01 Transitional" title="Valid HTML 4.01 Transitional" height="31" width="88" /></a> <a href="http://jigsaw.w3.org/css-validator/"><img class="c3" src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS!" title="Valid CSS!" /></a> <a href='http://www.noslang.com/validate.php?url=www.eaglelegend.com'><img src='http://images.eaglelegend.com/slangfree.gif' border='0' alt='Slang Free!' title='Slang Free!' /></a><br /> <?php echo $footer; ?></td> </tr> </table> </body> </html> what do should I do to correct that? Quote Link to comment https://forums.phpfreaks.com/topic/106680-php-html-to-xhtml/#findComment-546919 Share on other sites More sharing options...
roopurt18 Posted May 21, 2008 Share Posted May 21, 2008 Fix the contents of $footer? Quote Link to comment https://forums.phpfreaks.com/topic/106680-php-html-to-xhtml/#findComment-546940 Share on other sites More sharing options...
TheFilmGod Posted May 22, 2008 Share Posted May 22, 2008 The whole problem results from the fact that you are using tables. PHP + Tables = Chaos. Good luck figuring it out, bob. I would recommend, getting a good book on CSS, it will make your life 20000% easier. Quote Link to comment https://forums.phpfreaks.com/topic/106680-php-html-to-xhtml/#findComment-546957 Share on other sites More sharing options...
haku Posted May 22, 2008 Share Posted May 22, 2008 In XHTML, elements cannot overlap. So opening tags that open after a different opening tag must be closed before the containing tag can be closed. For example, this is no good: <div><p></div></p> Because the P tag is started after the DIV tag, it has to be closed before the DIV tag is closed. It should look like this: <div><p></p></div> This code is valid, because the P tag has been closed before the DIV tag, and as such is entirely enclosed within the div. So if you have this: <table><tr></table></tr> Which is appears you do by the other poster's comments, then this will be invalid code. Quote Link to comment https://forums.phpfreaks.com/topic/106680-php-html-to-xhtml/#findComment-547007 Share on other sites More sharing options...
Xurion Posted May 22, 2008 Share Posted May 22, 2008 PHP + Tabes are fine for displaying data. Laying out a site with tables can be ok, as long as you can keep your head. Quote Link to comment https://forums.phpfreaks.com/topic/106680-php-html-to-xhtml/#findComment-547371 Share on other sites More sharing options...
soycharliente Posted May 22, 2008 Share Posted May 22, 2008 It depends on the type of data. Tables are fine to use. CSS is great, but not for tabular data. If you're displaying rows a something that has numbers or data for each row, then a table is good. But if you just have 3 columns with 1 cell where you're putting an image and saying what that image has to do with your site, using a div is better. There's no reason that using tables should be difficult. If you can write good markup, then you should be fine. A lot of your errors, well actually all of them, stem from the missing DOCTYPE definition, missing quotes for tag attributes, wrong slashes, and use of attributes that don't exist (aren't supported) for some tags. I agree that CSS should be used, but using tables and CSS is not a problem with a little practice. Also, you are including a style sheet. There's no reason, IMO, to even have inline style definitions. If you're already using a style sheet, move your backgroud-color, margin, padding, etc. definitions to the style sheet. It's much easier to structure your page when you only have to look at the structural tags and not the styles. All of your style should be located in the same place. That way, if you have a problem with how something looks, you know exactly (or should) where to go. Instead of looking at the style sheet and seeing rules and looking at the tags and seeing attributes that are defined that may or may not conflict with the style sheet. Quote Link to comment https://forums.phpfreaks.com/topic/106680-php-html-to-xhtml/#findComment-547451 Share on other sites More sharing options...
haku Posted May 23, 2008 Share Posted May 23, 2008 Tables should only be used for tabular data - ie cross referencing two categories to give data. Tables should not be used for positioning elements on a page. Quote Link to comment https://forums.phpfreaks.com/topic/106680-php-html-to-xhtml/#findComment-547805 Share on other sites More sharing options...
Xurion Posted May 23, 2008 Share Posted May 23, 2008 It is personal preference. There are no rules as such, but not using tables is definitely more 'cleaner'. Quote Link to comment https://forums.phpfreaks.com/topic/106680-php-html-to-xhtml/#findComment-548021 Share on other sites More sharing options...
haku Posted May 23, 2008 Share Posted May 23, 2008 It's only partly personal preference right now, and soon to be less so. Using semantic markup - i.e. making the content inside an element match the name of that element - helps improve SEO ratings to a small degree. However Yahoo is currently designing algorithms that will place a lot more priority on semantic markup, and if they do you know google and microsoft will be soon to follow. When this happens semantic markup will be significantly more important. On top of this, pages laid out with CSS have faster loading times (from the second page onwards) due to caching of stylesheets, as well as easier to read code, which makes it easier to markup when the time comes. CSS also allows precise adjustments of page elements, with significantly less code. Sure its personal preference, if you don't mind doing it the old, out of date way. Quote Link to comment https://forums.phpfreaks.com/topic/106680-php-html-to-xhtml/#findComment-548077 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.