emvy03 Posted September 21, 2011 Share Posted September 21, 2011 Hi, This is going to seem really school boy and I'll probably get a bit of stick for this but I believe I'm having a problem with the DOCTYPE. The reason being that I'm getting about 40 errors when validating my website and most of them are OMITTAG NO. Admittedly some of my img tags haven't yet been closed but most of the errors are for <div>, <h4> etc where you don't close the tags by />. Please say if you need more elaboration. www.rumourdeal.co.uk is the site so you can see it. Cheers. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted September 21, 2011 Share Posted September 21, 2011 I didn't look at all of them, but it appears that many of the errors are because when you use an XHTML doctype, any tags that don't get explicitly closed with a closing tag (like <form></form>, <tr></tr>, etc.) must be closed within themselves with a /. So a <br> in HTML becomes a <br /> in XHTML, <img src='file.png'> becomes <img src='file.png' /> and so on. Quote Link to comment Share on other sites More sharing options...
emvy03 Posted September 21, 2011 Author Share Posted September 21, 2011 Hi, Thanks for the reply. I'm getting the same errors with some of them like <center>...</center>. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted September 21, 2011 Share Posted September 21, 2011 Now you've changed the DOCTYPE? Quote Link to comment Share on other sites More sharing options...
emvy03 Posted September 21, 2011 Author Share Posted September 21, 2011 Changed the DOCTYPE to html transitional and have solved all the major errors using validator but Internet Explorer still showing major flaws . Quote Link to comment Share on other sites More sharing options...
Stiver112 Posted September 22, 2011 Share Posted September 22, 2011 Change to HTML5 doc types...you will probably experience more errors when validating, but the you just need to correct all the errors... i think its worth the time to get a valid HTML5 site Quote Link to comment Share on other sites More sharing options...
emvy03 Posted September 22, 2011 Author Share Posted September 22, 2011 Hi, Thanks for all the help. I think I'm starting to get some where now with the errors. Is there anyway to work around using the 'name' attribute. I need it to enable my javascript to work but validation is telling me that the 'name' attribute is now obsolete. Thanks. Quote Link to comment Share on other sites More sharing options...
Stiver112 Posted September 23, 2011 Share Posted September 23, 2011 what element type is the name connected with? Quote Link to comment Share on other sites More sharing options...
emvy03 Posted September 23, 2011 Author Share Posted September 23, 2011 Its a Div tag for the voting system on my site. I'm not too too worried about at the minute, my biggest concern is the site won't display properly across the different browsers. IE now works perfectly, but Firefox and Chrome are now suffering. Its the complete opposite problem I was having a few days ago. I believe the site passed validation so I don't really know what's going on. :'( Quote Link to comment Share on other sites More sharing options...
Stiver112 Posted September 23, 2011 Share Posted September 23, 2011 IE SUX, thats just it! the only thing you can do is to try experimenting with different styles that is the same in all browseres, maing your site validate both in CSS and HTML will probably help the compatability. Name tag on a div probably cant be recreated to so that i validates as nametags are not supposted to be in a div... here you can only use class and id Quote Link to comment Share on other sites More sharing options...
emvy03 Posted September 23, 2011 Author Share Posted September 23, 2011 Hi, Thanks so much for your help. There was a rogue element in there causing havoc which has since been removed. Microsoft IE I have found to be a pain, much prefer to use Chrome. Cheers 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.