1. Embed is illegal The <embed> tag is a private tag of Netscape. Although the <embed> tag is widely used, it has not been included in the W3C from HTML3.2, HTML4.0 to XHTML1.0. Pages using the <embed> tag will not pass the W3C validation. 2. Object should be used W3C recommends the <object> tag. Even in XHTML2, <img> will be replaced by <object>. The code to insert the flash using the <object> method is: <object type="application/x-shockwave-flash" data="test.swf" width="200" height="100"> <parm name="movie" value="test.swf /> </object> However, this method cannot display correctly on IE5-IE6/Win (it cannot be played continuously and must be downloaded before it can be played), but it can display correctly on lower versions. Later, the problem of continuous playback was solved by first calling a small flash file and then embedding a large flash file. However, in versions above IE5, the flash sometimes still cannot be displayed. 3. Current temporary measures So what should we do to comply with the standards and display Flash correctly in all browsers? How did the macromedia website pass the W3C validation? Some designers thought of using JavaScript to hide the illegal <embed> tag. <script type="text/javascript"> if (navegiator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] { document.write(''<embed src="test.swf" ... This is currently the better solution. If you must insert flash, use js to call it. This method can deceive the W3C validation program and make the page pass the validation. But it's just "cheating", not really meeting the standards. How does Macromedia do it? See this code: <!-- $RCSfile: FlashDetection2k.pm,v $ $Revision: 1.68 $ : your browser''s accept header indicates you have Flash 6,0,65,0 or better, so you''re OK for this Flash 6 movie, here it comes. --> It adopts a compromise approach: (1). First, JavaScript is used to determine the version of your browser and flash player; (2) Dynamically generate HTML code in the background according to different versions. Simply put, the <object> method is used by default. If the browser cannot handle the MIME type of the object "application/x-shockwave-flash", it inserts the child element <embed>. To be honest, this is similar to using js to hide the <embed> method, which is also a "cheating" method, but it is the most standard and perfect approach that can be done at present. If we want to truly abandon <embed>, we can only wait for IE browser to better support <object>, perhaps until Longhorn comes out. |
<<: MySQL Series II Multi-Instance Configuration
>>: Detailed steps for Spring Boot packaging and uploading to Docker repository
1. Check and install pssh, yum list pssh 2. Becau...
Docker Hub official website 1. Search for Python ...
background Some time ago, our project team was he...
1. Monitoring planning Before creating a monitori...
<br />The page uses UTF8 encoding, and the h...
This article example shares the specific code of ...
I just saw a post titled "Flow Theory and Des...
Preface Take Element Plus as an example to config...
In the actual projects I participated in, I found...
Brief description Suitable for readers: Mobile de...
View system help help contents mysql> help con...
1. Download Navicat for MySQL 15 https://www.navi...
Table of contents Lock Overview Lock classificati...
Overview of MySQL MySQL is a relational database ...
The display without the effect picture is just em...