Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Objects Embedded Elements

Raquel Redondo
Raquel Redondo
6,494 Points

param and embed closing tags error.

When I copy-paste the youtube code in my workspace, the closing param and embed tags (</param> and </embed>) are highlighted with red. When I preview my code there is nothing wrong, everything is working perfectly. I do not know what's wrong. Here is a copy of Youtube's code I am using:

    <object width="420" height="315">
      <param name="movie" value="http://www.youtube.com/v/_OBlgSz8sSM?hl=es_ES&amp;version=3"></param>
      <param name="allowFullScreen" value="true"></param>
      <param name="allowscriptaccess" value="always"></param>
      <embed src="//www.youtube.com/v/_OBlgSz8sSM?hl=es_ES&amp;version=3" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed>

2 Answers


YouTube is most likely trying to support multiple configurations with their code. That may be the reason why there's an error in the workspace.

If you prefer to use the older version, you can use this code generator, and below is an example of what it generated.

<object type="application/x-shockwave-flash" style="width:420px; height:315px;" data="http://www.youtube.com/v/_OBlgSz8sSM?color2=FBE9EC&amp;version=3&amp;fs=1">
        <param name="movie" value="http://www.youtube.com/v/_OBlgSz8sSM?color2=FBE9EC&amp;version=3&amp;fs=1" />
        <param name="allowFullScreen" value="true" />
        <param name="allowscriptaccess" value="always" />
Robert Manolis
Robert Manolis
Treehouse Guest Teacher

If the preview is correct than the coloring might just be the default styling of the workspaces text editor.

You know what they say... "if aint broke... "

Raquel Redondo
Raquel Redondo
6,494 Points

Thank your for your answer. I don't think that's the case because all other closing tags (that are before the param tags) are colored normal. This type of highlighting has happened to me before whenever I made some kind of typo. I am guessing that it is some kind of incompatibility between the html versions. Apparently Treehouse's workspace may be working with a newer version of html.