jme574 Posted March 4, 2005 Posted March 4, 2005 (edited) I used a program NetMechanic on my website and did an html checkon my site. While most of the pages wos fine i had one page that had 249 of the same errors. Not being very smart at web design, i used a pre made template and imputed what i nedded where i needed. I assumed that being a pre made template, that the layout coding would be good, but i must have been mistaken. By any chance does anyone know what this means? <td> attribute "align" has invalid value "middle" Or would you have to see the page to know what it was referring too? This is the page it came from http://multipurposehosting.com/webhosting.htm Edited March 4, 2005 by jme574 Quote
TweezerMan Posted March 4, 2005 Posted March 4, 2005 You have a tag that looks something like this: ><td align="middle"> The allowed values for the align attribute in a <td> tag are center, left, and right. So what you need to do is change the align attribute from middle to center: ><td align="center"> Hope this helps... Quote
stevevan Posted March 4, 2005 Posted March 4, 2005 Try making the align tag say "center" instead of "middle" Dave...you're just too fast! Quote
TweezerMan Posted March 4, 2005 Posted March 4, 2005 Clearly I had a head start - I'm not *that* fast! Quote
jme574 Posted March 4, 2005 Author Posted March 4, 2005 thank you - now i only have to change that 249 times Quote
TweezerMan Posted March 4, 2005 Posted March 4, 2005 That's what Search/Replace -> Replace All in your favorite editor is good for. Quote
jme574 Posted March 4, 2005 Author Posted March 4, 2005 LOL! I wish i would have waited for that reply before i started. While replacing those i came accross what i believe to be the last 2 errors on this page. 0025: MultiPurposeHosting.com</a><img src="images/separator.jpg" height="22" hspace="7" vspace="5" [1]^align="absmiddle"><span class="companyslogan">Dedicated ----:[1]^Warning: <img> attribute "align" has proprietary value "absmiddle". and 1001:</html>[251]^ ----:[251]^Warning: HTML content does NOT match <!DOCTYPE>. I think the "absmiddle" should now be "abscenter". Would this be correct? And i am not sure what the error on line 1001 would be. Quote
stevevan Posted March 4, 2005 Posted March 4, 2005 If it's an image, then it should be just "middle". Quote
TweezerMan Posted March 4, 2005 Posted March 4, 2005 For an <img> tag, the allowed values for the align are left, right, top, middle, bottom. Looks like "middle" is your answer here. That last error seems to be saying that something in your page does not conform to the standard declared by the DOCTYPE statement at the top of your page: ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> I don't see anything obvious that would account for that kind of error though. Quote
borfast Posted March 5, 2005 Posted March 5, 2005 You could also use CSS instead of directly changing the align tag (which is deprecated, anyway). Instead of using <td align="center">, you could use <td class="centered"> (or some other name for the class, of course) and then, in a separate CSS file which you would include at the top of the HTML file, you'd just put the following: .centered { text-align: center; } This way, if you needed to change the text alignment, you'd just have to change the CSS file, not 249 HTML files Quote
jme574 Posted March 5, 2005 Author Posted March 5, 2005 Thank you guys very much for your help. This is why i like TCH so much. I have managed, we your help to get everything but this fixed and i have looked several other places for reference with no luck. 1001:</html>[251]^ ----:[251]^Warning: HTML content does NOT match <!DOCTYPE>. Quote
TCH-Don Posted March 5, 2005 Posted March 5, 2005 You might try the full doctype ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> Quote
owatagal Posted March 5, 2005 Posted March 5, 2005 (edited) Thank you guys very much for your help. This is why i like TCH so much. I have managed, we your help to get everything but this fixed and i have looked several other places for reference with no luck. 1001:</html>[251]^ ----:[251]^Warning: HTML content does NOT match <!DOCTYPE>. <{POST_SNAPBACK}> I noticed that it looks like your meta, break, and image tags aren't closed. They all have to have trailing slashes in them to be valid HTML transitional (I'm pretty sure they do, anyway): ><meta name="" content="" /> <br /> <img href="" width="" height="" alt="" /> Right now yours don't have that closing slash. That might be generating the error. Edit: No, sorry, that's an XHTML, not HTML, requirement. My mistake. Edited March 5, 2005 by owatagal Quote
TweezerMan Posted March 5, 2005 Posted March 5, 2005 Don's suggestion may work, but I'd recommend using a full HTML 4.01 DOCTYPE declaration instead of an HTML 4.0 one, since HTML 4.01 is being used now: ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> Quote
TweezerMan Posted March 5, 2005 Posted March 5, 2005 I'm not sure exactly what NetMechanic is looking for, but if you run your home page through the W3C HTML Validator, there's quite a few errors detected for things on your page that are not within the DOCTYPE spec. If you cleared those up, maybe NetMechanic would quit reporting that last error you're seeing. Quote
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.