Title: Validation errors caused by YouTube code
Last modified: August 18, 2016

---

# Validation errors caused by YouTube code

 *  [djrockwell](https://wordpress.org/support/users/djrockwell/)
 * (@djrockwell)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-errors-caused-by-youtube-code/)
 * I just finished using the W3.org Validator and all of my errors are caused from
   embedded YouTube code. Since I just copy the “embed” code right from YouTube 
   and post it in my blog, is there anything I can do? Do I have to manually modify
   the code or just live with the XHTML errors it causes?
 * Here are some of the validation errors:
 * Line 51 column 14: there is no attribute “src”.
 * Line 51 column 58: there is no attribute “type”.
 * Line 51 column 96: there is no attribute “wmode”.
 * Line 51 column 116: there is no attribute “width”.
 * Line 51 column 129: there is no attribute “height”.

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [jetshack](https://wordpress.org/support/users/jetshack/)
 * (@jetshack)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-errors-caused-by-youtube-code/#post-532702)
 * link to site?
 *  Thread Starter [djrockwell](https://wordpress.org/support/users/djrockwell/)
 * (@djrockwell)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-errors-caused-by-youtube-code/#post-532774)
 * Here it is: theidiotnation dot c
 * I can’t believe others aren’t having this problem?
 *  [Doodlebee](https://wordpress.org/support/users/doodlebee/)
 * (@doodlebee)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-errors-caused-by-youtube-code/#post-532775)
 * Yeah, others have this problem. Most of them don’t care, though.
 * I always forget which one is invalid – the `<embed>` or `<object>` tag. In all
   honesty – one is valid, the other is not. One was used, bascially, because way
   back when, Netscape 4 didn’t recognize one of the tags, but everyone else recognized
   the other. So both have been used for a long time, until W3C deprecated the one
   tag when using XHTML, and renders your site invalid when using it.
 * In the end, there are several solutions (I know of a javscript and there’s a 
   plugin, I’ve heard, that handles this issue), but the easiest I’ve come across
   is to just not use the deprecated tag. You can use *just* the other one, and 
   it’ll still run fine.
 * EDIT: it’s the `<embed>` tag that’s not valid. Just don’t use it.
 *  [Les Bessant](https://wordpress.org/support/users/lesbessant/)
 * (@lesbessant)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-errors-caused-by-youtube-code/#post-532779)
 * For easy insertion of YouTube and other videos with valid code, try [Viper’s Video Quicktags](http://www.viper007bond.com/wordpress-plugins/vipers-video-quicktags/).
 *  Thread Starter [djrockwell](https://wordpress.org/support/users/djrockwell/)
 * (@djrockwell)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-errors-caused-by-youtube-code/#post-532783)
 * Thanks for the replies…I’ll check out the Viper plug-in.
 *  [brettbum](https://wordpress.org/support/users/brettbum/)
 * (@brettbum)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/validation-errors-caused-by-youtube-code/#post-532928)
 * I see the same problem with revver code. I attempted to put java script in between
   code tags. but word press tries to put a p tag inside the code tag?
 * Here’s example link
    [post with javascript from revver](http://www.softduit.com/mavenmappersinformation/2007/04/27/screen-recording-while-running-dragon-naturally-speaking/)
 *  [SaltwaterC](https://wordpress.org/support/users/saltwaterc/)
 * (@saltwaterc)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/validation-errors-caused-by-youtube-code/#post-532937)
 * [http://www.4tm.com.ar/4tmsite/wordpress/?p=5](http://www.4tm.com.ar/4tmsite/wordpress/?p=5)–
   this How-To explains how to convert the invalid code into a valid one by removing
   the embed tag, and properly use the object one. Of course, the other solution
   is Viper’s Video Quicktags 🙂 … The object + param solution works for any online
   flash content: YouTube, Google Video, Metcafe, etc. or a simple FileFactory broken
   flash player.
 *  [Hook](https://wordpress.org/support/users/hook/)
 * (@hook)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/validation-errors-caused-by-youtube-code/#post-532940)
 * I use this solution:
    [http://www.sampletheweb.com/2006/09/10/how-to-embed-youtube-and-google-video-without-breaking-validation/](http://www.sampletheweb.com/2006/09/10/how-to-embed-youtube-and-google-video-without-breaking-validation/)

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Validation errors caused by YouTube code’ is closed to new replies.

## Tags

 * [validation](https://wordpress.org/support/topic-tag/validation/)
 * [xhtml](https://wordpress.org/support/topic-tag/xhtml/)
 * [Youtube](https://wordpress.org/support/topic-tag/youtube/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 8 replies
 * 7 participants
 * Last reply from: [Hook](https://wordpress.org/support/users/hook/)
 * Last activity: [18 years, 11 months ago](https://wordpress.org/support/topic/validation-errors-caused-by-youtube-code/#post-532940)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
