Errors and warnings in html code
As shown in the link below my code is obviously full of errors
I am no html expert, but from what I can tell a lot of these errors come from me embedding youtube and vimeo videos. Am I correct? When I write my posts I work in both the visual and the html editor, and I have embedded every video through the html editor (pasted the embedded code manually into the desired spot) . Is this where I have gone wrong?
My site appears the way I want it, but I know such errors in code are not desirable. So how can I get rid of these errors and warnings? Do I need to go back and re-embedd each video through the “insert video” icon at the top bar of the editor?
After running the test shown in the link above, I decided to turn on the “WordPress should correct invalidly nested XHTML automatically” option. This removed one single error…
I have not done any edits in the CSS, and I was actually quite surprised that I got that many errors and warnings considering the amount of posts…
All help is deeply appreciated!
The blog I need help with is ogcontent.com.
Yes, youtubes always throw a ton of errors into your feed. Unfortunately, there’s really nothing you can do about it except push them off the front page with text-based posts. It doesn’t matter what method you use to embed the videos, they always put errors in there.
Thanks for the quick reply.
Even if I rule out the youtube issues, I’m still stuck with a bunch of errors. Below I ran the same test on a post that is pure text, with the exception of two ordinary links, I still 6 errors. Is there anything I can do about these? They seem to involve bits of code I have not altered…
And out of curiosity i ran a test on some big sites which embed tons of youtube (and other) videos each day, and they had far less errors. Weird
WordPress.com feeds and youtubes don’t get along. They never, ever have.
Okay, one of the other sites I checked was a big site with a lot of youtube embedd that uses wordpress.com VIP, and it has half the errors that my site has…
Maybe embedding through Vodpod would do the trick?
Anyway, if we look past the youtube errors, is there anything I can do to fix the errors NOT relating to youtube?
Preciate the input
Any video embed from anywhere that you put anywhere (here, self-hosted, blogger, a plain HTML site) will throw tons of errors.
About all you can do it so try and fix the errors you can, such as missing alt tags on images, missing ending formatting tags, etc. WordPress.COM has a declared doctype of HTML5 and since that is still a work in progress, all validation out there is in the “experimental” stage so I would not worry too much about it.
Also, there are a lot of HTML tags that are now obsolete in HTML5. Most browsers will still render them in an HTML5 page, but they will throw errors.
Go to settings > writing and select to have wordpress automatically correct improperly nested HTML and then save. That will keep most general issues with tags and such from causing validation errors.
Also, there are some tricks that have to be used to accommodate older browsers that are not entirely HTML5 compliant, and those can throw errors. Until we can pry IE6 and Firefox 2 and such off the computers of the “reluctant ones” there are likely to be some errors show up.
Okay that could probably explain some of the errors. The validator detected the doctype to be XHTML 1.0 Transitional, but I trust you know your stuff.
So even if I redirected the embed via Vodpod I would still get tons of errors right?
After running the first test I did select to have wordpress automatically correct improperly nested HTML, and saved. I then went in and updated each of my posts (without making any other edits), but like I said this only removed one single error in total.
I try to make sure my html tags are properly closed, but like I said I’m no pro yet. Can you (through the validator link) spot any tags that I haven’t closed, errors that I can in fact fix myself?
Thanks for the help guys!
The topic ‘Errors and warnings in html code’ is closed to new replies.