Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

londonweb

macrumors 6502
Original poster
Sep 14, 2005
260
0
london
When I try to validate my pages containing Flash content, or Quicktime or whatever, I get the message "The tag name 'embed' not found in currently active versions". I get this when using HTML 4.01 or XHTML 1.0 , loose, transitional, or whatever.

Do I assume from this that embedding any sort of the aforementioned media types is considered invalid markup? Or is there a way to do it? I've tried looking on W3c.org but not really found anything.

It's not a big deal but would be nice to find out.
 
To validate embedded flash-contents, and make it work in several browsers isn't any fun at all.

What you could try is to apply the eolas-fix (basically just move the code into an external java script file and write it from there using script tags) or use something like this:

HTML:
<object type="application/x-shockwave-flash" data="path/to/file.swf" width="130" height="60">
<param name="movie" value="path/to/file.swf" />
<img src="path/to/alternative.gif" width="130" height="60" alt="whatever" />
</object>
The above code should validate, even on XHTML 1.1 strict... :)
 
Ok, thanks.

Out of interest, do you know what the consequences are (if any) of using invalid mark-up such as I've done?
 
Ok, thanks.

Out of interest, do you know what the consequences are (if any) of using invalid mark-up such as I've done?

this is an interesting question to me, as i've just had a long conversation about standards and such with several people. here's my opinion and some technical viewpoints, and several of those people seemed to agree with me. there were also some who argued against it...

if you are looking to have your page viewed only by browsers on a traditional computer, there are no consequences to not validating. however, if you want this to scale to handheld devices and such, some of the browsers on those will not parse the content correctly unless it validates against certain standards. i wish i had specifics on which browsers/devices/standards combinations required what, but i don't know of an exhaustive list anywhere, unfortunately.

that is the reasoning behind the newer standards, especially XHTML. newer standards are more for the future than now. by sticking closer to a standard, the browser doesn't have to worry about closing <p> tags for you, knowing when a break tag ends (<br> should be <br />), and be concerned about all the different "possibilities." This makes the codebase smaller, more efficient and easier to fit on smaller-capacity devices. if the browser knows exactly what to expect, it only has to look for that and doesn't have to worrying about assuming what you might (or might not) have wanted to do. and if something doesn't fit in the standard, it just rejects it. think parsing xml, which is exatly what is going on.

sticking to standards also (theoretically) helps to keep content appearing consistently in all browsers (on traditional computers in the context of this paragraph), but anyone who has worked in this field knows this just doesn't happen.

i would hope more people would join in this particular discussion. i'm very interested to hear what people think about this subject.
 
Hi Thom, these are interesting points and the first time I've really heard some sound reasoning behind validation. I'm sure W3C says all this stuff somewhere but it seems it's rather buried in reams of technical jargon.

I'm approaching web development from a graphic design background, so I tend to put more emphasis on looks and learn the technical side as and when I need to. I'm interested in standards because of course most of it is related directly to the appearance of web pages. I love the idea of it all, and get a certain amount of nerdy satisfaction when my pages validate, but I certainly won't be losing too much sleep over pages that don't, unless there's a fix that doesn't make the whole thing more complicated than it needs to be.

I recently had my first client who was interested in how her site looked on a mobile device, which rather caught me out. We used to have to design to 640x480, then 600x800, and now we can usually get away with designing to 1024x768. I think the general consensus is that as screens get bigger and cheaper, the available space will just go up and up, with happy days for the designer, but of course now that mobile devices are becoming the thing and most of them have a screen width of about 300 pixels at the maximum, we might find ourselves having to design to much smaller formats, or even producing a whole different style sheet for them. If standards can help us in these sorts of areas then all the better.

The thing with standards is that validation doesn't necessarily mean that your page will look right in all browsers, so a lot of time we wonder what's the point of trying to adhere to them. This of course isn't the fault with standards or the W3C, it's more a problem with older browsers and uncooperative browsers like IE. As you say, standards are more a vision of the future than anything particularly useful in the here and now, but perhaps if we all get into the habit early on, designing for the web in years to come will all be a lot simpler, and won't that be nice.:)
 
These links may be of use.
They are all from A List Apart.

Flash Satay
Bye Bye Embed

There are others around there as well.

I put together a support tutorial section for a site, that uses flash movies to demonstrate basic operations, using the above information. Works just fine, and validates as well.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.