| fix w3 validator errors
|
cfc106

msg:4277573 | 11:23 pm on Mar 6, 2011 (gmt 0) | Here is my code, I omitted some non relevant stuff to shorten it. <body> <div id="Content" align="center"> <table id="tContent"> <tbody> <tr> <td> <p id="menu"> <a href="#bio" title="About Me">About</a>- <a href="#assignments" title="Class Assignments">Assignments</a>- <a href="#contact" title="Contact">Contact</a> </p> <br /> <p> <h1 id="heading">Welcome To My Page!</h1> <img src="images/chinese.png" alt="Huanying nin dao wo de wangye!"/><br /> <img src="images/profile_headshot.jpg" id="profile" alt="Me" title="A Picture of Me" /> <p id="bio"> Hello, Ni hao, and Wah Gwan? </p> <p id="hobbies"> <b>For fun I enjoy some of these fun hobbies:</b><br /> - <a href="http://en.wikipedia.org/wiki/LAN_party" title="What is a LAN party?" target="_blank">LAN Parties</a> </p> <hr /> <h4 id="assignments">Assignments</h4> <a href="assignments/tutorial1_case1/euler.htm" target="_blank">Leonard Euler, Mathematics Dept., Costal University</a><br /><br /> <hr /> <h4 id="contact">Contact</h4> Phone Number: (407)-967-****<br /> Email Me @: <a href="mailto:******@gmail.com" title="Gmail">******@gmail.com</a><br /> </p> </td> </tr> </tbody> </table> </div> </body> here are the errors they are on the h, p, and hr tags: Error Line 21, Column 37: document type does not allow element "h1" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag Line 24, Column 32: document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag Line 42, Column 26: document type does not allow element "hr" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag thanks! [edited by: tedster at 1:20 am (utc) on Mar 7, 2011] [edit reason] to obscure the phone and email [/edit]
|
SevenCubed

msg:4277580 | 11:43 pm on Mar 6, 2011 (gmt 0) | Hi cfc106, welcome to Webmaster World. There are many more errors in your example than the ones you indicated depending on which DTD you are using. Example: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> Please indicate the DTD you have applied and we can take it from there.
|
g1smd

msg:4277583 | 11:53 pm on Mar 6, 2011 (gmt 0) | A page is made of headings, paragraphs, lists, tables and forms. Those are block level elements. You can't have a heading inside a paragraph. Headings and paragraphs are separate items. Put paragraph tags around each bit of content that is not already surrounded by heading tags. Make sure there is a matching closing tag for every opening tag. I would stick to <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> to keep things simple.
|
cfc106

msg:4277767 | 1:49 pm on Mar 7, 2011 (gmt 0) | SevenCubed, i used 1.0 transitional but i am changing it to 4.0 transitional. thanks g1smd, i will do that.
|
g1smd

msg:4277775 | 2:04 pm on Mar 7, 2011 (gmt 0) | You'll need to change <br /> to <br> in that case. However, once you have all your words either inside a heading or inside a paragraph, it is much easier to control spacing by using simple CSS and delete all the <br> tags completely.
|
|
|