SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
-
Aug 27, 2009, 02:06 #1
- Join Date
- Aug 2009
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
YouTube embedd code breaking my W3C validation
Hi Guys,
I've been doing quite a bit of research on this and trying to find a fix, but with no luck.
I was wondering why my new blog was getting some W3C validation errors when tested, and after doing a bit of research I learned it was because YouTube's embed code is not recognised as valid XHTML by W3C. So the pages with YouTube videos are showing as not valid W3C code!
Can anyone help me get some clean code to fix this?
-
Aug 27, 2009, 02:17 #2
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
You have two choices - accept that browsers understand the invalid code and accept it as it is - or rewrite it to be valid. If you choose the second option then presumably you have enough knowledge of how to write valid HTML to be able to rewrite it.
Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
Aug 27, 2009, 02:24 #3
- Join Date
- Aug 2009
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You see, I'm a graphic designer by profession, I can't post a link to my site I don't think because I'm a newb here. I can write valid code and do so for the agency I work for but I think the problem with the YouTube code is there is an "=" symbol where it shouldn't be, based on the error.
I'm guess what I'm asking for is if there are any experts that can help me out here!
I am happy that my site does work, but when others look at my site and know that I also do code for the web it looks bad if they validate it and see I have errors, regardless if it's just post content related, you know?
So, any help?
-
Aug 27, 2009, 04:37 #4
- Join Date
- Feb 2007
- Location
- Melbourne, Australia
- Posts
- 171
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What's the specific validation error?
-
Aug 27, 2009, 04:51 #5
- Join Date
- Aug 2009
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I managed to get this fixed through a bit more further research.
I got the code that will work for Vimeo, and YouTube and validate via W3C... I would post here but again being a newb it won't let me!
-
Aug 27, 2009, 08:35 #6
You can still post your code though...
-
Aug 27, 2009, 08:40 #7
- Join Date
- Aug 2009
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I did try that but it said that it detected a URL in the code and wouldn't let me until I had something like 5 posts!
Bookmarks