Jump to content

DOCTYPE help


emvy03

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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. :'(

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.