bobleny Posted June 16, 2006 Share Posted June 16, 2006 I rewrote one of my HTML pages in XHTML and I checked it with W3C’s validation service and I get 5 errors, 4 of which are the same. The 4 say, there is no attribute "background", there is no attribute "height", there is no attribute "hsrc", there is no attribute "onClick", there is no attribute "align". I do not understand what that means?I know this is a HTML forum help but hopefully someone here knows XHTML!Thanks. If you need codes ask. Quote Link to comment Share on other sites More sharing options...
AndyB Posted June 16, 2006 Share Posted June 16, 2006 Pretty simple stuff. It means that the element(s) for which you have used the attribute 'height', height is NOT supported by the (x)HTML standard you're using. For example - height is NOT a supported attribute for the table element (despite many editors allowing it!). onClick might well be substituted by onclick (all lower case), and I've never seen hsrc. Etc., etc.Basically, your code contains non-compliant html.Couple of hints - html and xhtml are virtually identical. In xhtml always use lower case for attributes, always enclose attribute values with quotes. Quote Link to comment Share on other sites More sharing options...
bobleny Posted June 16, 2006 Author Share Posted June 16, 2006 Line 309 column 21: there is no attribute "align". <span align="center">They recomended useing span to align center the image yet they say its not promited?hsrc is part of a javascript and it is doing rolloverswhat should I do about the hight attribute? I don't think I can delete it. Should I just leave it there? Quote Link to comment Share on other sites More sharing options...
AndyB Posted June 16, 2006 Share Posted June 16, 2006 Remote diagnosis when blindfolded is very difficult :)Now if we got a look at the code, we could help. Part of the problem might be the DOCTYPE, but the root of the problem's in the code. 'Align' is long deprecated. And yes, xhtml compliant rollovers are possible. Quote Link to comment Share on other sites More sharing options...
bobleny Posted June 16, 2006 Author Share Posted June 16, 2006 Yeah, not a problem, here's the code.[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- <script type="text/javascript"> function init() { if (!document.getElementById) return var imgOriginSrc; var imgTemp = new Array(); var imgarr = document.getElementsByTagName('img'); for (var i = 0; i < imgarr.length; i++) { if (imgarr[i].getAttribute('hsrc')) { imgTemp[i] = new Image(); imgTemp[i].src = imgarr[i].getAttribute('hsrc'); imgarr[i].onmouseover = function() { imgOriginSrc = this.getAttribute('src'); this.setAttribute('src',this.getAttribute('hsrc')) } imgarr[i].onmouseout = function() { this.setAttribute('src',imgOriginSrc) } } } } onload=init; </script> --> <link href="css.css" rel="stylesheet" type="text/css" /> <title>About Me</title> </head> <body> <table border="0" cellpadding="0" cellspacing="0" align="center" width="100%"> <tr> <td> <table border="0" cellpadding="0" cellspacing="0" align="left" width="932"> <tr> <td align="left"> <img src="nav_top_bann.png" width="932" height="69" alt="" /> </td> </tr> </table> </td> </tr> <tr> <td> <!-- Line 56 column 34: there is no attribute "background". Line 56 column 113: there is no attribute "height" --> <table border="0" background="nav_time.png" cellpadding="0" cellspacing="0" align="left" width="700" height="23"> <tr> <td align="left"> <span class="secondhand"> Thursday, June 15th, 2006 </span> </td> </tr> </table> </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" align="left" width="100%" height="100%"> <tr> <td> <table border="0" cellpadding="0" cellspacing="0" align="left" width="192" height="100%"> <tr> <td> <img src="spacer1.3.png" alt="" /> <a href="index.php" target="_top"> <!-- Line 80 column 37: there is no attribute "hsrc". --> <img src="home1.0.png" hsrc="home1.2.png" border="0" alt="" /> </a> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td> <img src="spacer1.2.png" alt="" /> <a href="about.php" target="_top"> <img src="about1.0.png" hsrc="about1.2.png" border="0" alt="" /> </a> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td> <img src="spacer1.2.png" alt="" /> <a href="flash.php" target="_top"> <img src="flash1.0.png" hsrc="flash1.2.png" border="0" alt="" /> </a> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td> <img src="spacer1.2.png" alt="" /> <a href="joke.php" target="_top"> <img src="joke1.0.png" hsrc="joke1.2.png" border="0" alt="" /> </a> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td> <img src="spacer1.2.png" alt="" /> <a href="ge.php" target="_top"> <img src="ge1.0.png" hsrc="ge1.2.png" border="0" alt="" /> </a> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td> <img src="spacer1.2.png" alt="" /> <a href="guide.php" target="_top"> <img src="guide1.0.png" hsrc="guide1.2.png" border="0" alt="" /> </a> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td> <img src="spacer1.2.png" alt="" /> <a href="down.php" target="_top"> <img src="down1.0.png" hsrc="down1.2.png" border="0" alt="" /> </a> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td> <img src="spacer1.2.png" alt="" /> <a href="link.php" target="_top"> <img src="link1.0.png" hsrc="link1.2.png" border="0" alt="" /> </a> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td> <img src="spacer1.2.png" alt="" /> <a href="stories.php" target="_top"> <img src="stories1.0.png" hsrc="stories1.2.png" border="0" alt="" /> </a> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td> <img src="spacer1.2.png" alt="" /> <a href="store.php" target="_top"> <img src="store1.0.png" hsrc="store1.2.png" border="0" alt="" /> </a> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td> <img src="spacer1.2.png" alt="" /> <a href="forum.php" target="_top"> <img src="forum1.0.png" hsrc="forum1.2.png" border="0" alt="" /> </a> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td> <img src="spacer1.2.png" alt="" /> <a onclick="history.back()" target="_top"> <img src="back1.0.png" hsrc="back1.2.png" border="0" alt="" /> </a> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td> <img src="spacer1.0.png" alt="" /> </td> </tr> <tr> <td height="100%"> <img src="spacer1.1.png" height="100%" width="192" alt="" /> </td> </tr> <tr> <td> <img src="nav_bot.png" alt="" /> </td> </tr> </table> </td> <td valign="top"> <table border="0" cellpadding="12" cellspacing="0" align="left" width="92%"> <tr> <td valign="top" align="left"> <!-- Text Below --> <!-- Text Above --> <p> <!-- Line 312 column 21: there is no attribute "align". --> <span align="center"> <img src="copyright.jpg" alt="" /> </span> </p> <table border="0" background="link_of.png" cellpadding="0" cellspacing="0" align="center" width="458" height="26"> <tr> <td align="center"> <span class="secondhand"> Link of the what ever I feel like putting here! </span> </td> </tr> </table> <table border="0" background="banner_back.png" cellpadding="0" cellspacing="0" align="center" width="493" height="162"> <tr> <th> <a href="http://www.mozilla.com" target="_blank"> <img src="fin.png" border="0" alt="" /> </a> </th> </tr> </table> </td> </tr> </table> </td> </tr> </table> <!-- Copyright 2005-2006 www.firemelt.net. All rights reserved. All content is copyrighted by firemelt.net. --> <!-- Scripted and designed by Bob Leny, www.firemelt.net --> </body></html>[/code] Quote Link to comment Share on other sites More sharing options...
AndyB Posted June 16, 2006 Share Posted June 16, 2006 Lose the 'height' attribute in the table declaration. Get the background via styling:[code]table style="background: url(nav_time.png)" ...[/code]If we're lucky, I'll find a compliant mouseOver on something I've done before. Quote Link to comment Share on other sites More sharing options...
king arthur Posted June 17, 2006 Share Posted June 17, 2006 Try using 'center' tags instead of 'align="center"', it's also deprecated but is ok in XHTML Transitional and sometimes I just find it's the quick and dirty solution to centering things. Quote Link to comment Share on other sites More sharing options...
bobleny Posted June 17, 2006 Author Share Posted June 17, 2006 Yeah, <center></center>. Thats what I always use but the W3C vilation thingy says I can't use it.But anyways. I'm going to let this go because I'm geting one error after another and infact the page in XHTML doesnt display right. I would have to rewrite the whole thing. So for now I guess I won't be useing XHTML.Thanks for your help and sorry to waist our time. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 17, 2006 Share Posted June 17, 2006 For one dont use tables! try to create a CSS layout instead. Its much easier and better, that way you can change your site looks by changing your style sheet. Quote Link to comment Share on other sites More sharing options...
bobleny Posted June 17, 2006 Author Share Posted June 17, 2006 Well, actually I can chage the entier layout, look, feel, design and graphics by changeing 3 files. So id say I've done pretty good. Quote Link to comment 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.