{"id":1089,"date":"2007-01-11T22:48:53","date_gmt":"2007-01-11T21:48:53","guid":{"rendered":"https:\/\/www.dreamsworld.it\/emanuele\/2007-01-11\/validazione-w3c-con-codici-embed\/"},"modified":"2016-05-01T19:30:14","modified_gmt":"2016-05-01T17:30:14","slug":"validazione-w3c-con-codici-embed","status":"publish","type":"post","link":"https:\/\/www.dreamsworld.it\/emanuele\/2007-01-11\/validazione-w3c-con-codici-embed\/","title":{"rendered":"Validazione W3c con codici embed"},"content":{"rendered":"<p>In questi giorni si parla di <a target=\"_blank\" title=\"Roba da robot\" href=\"http:\/\/taoblog.org\/2007\/01\/11\/roba-da-robot\/\">validazione<\/a>. Sono molti i blog non conformi agli standard del <a target=\"_blank\" title=\"The World Wide Web Consortium\" href=\"http:\/\/www.w3.org\/\">W3c<\/a> (il World Wide Web Consortium) ed uno dei motivi spesso \u00e8 l&#8217;inclusione all&#8217;interno delle loro pagine di elementi multimediali.<\/p>\n<p>Il problema risiede nel tag <a target=\"_blank\" title=\"EMBED Element | embed Object\" href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms535245%28VS.85,loband%29.aspx\">embed<\/a> non conforme agli standard del w3 Consortium ed utilizzato da Internet Explorer per inserire elementi multimediali all&#8217;interno delle pagine web.<\/p>\n<p>Giusto per risolvere il problema del &#8220;webmaster della domenica&#8221; e non annoiare tutti quanti su approfondimenti circa gli standard proprietari di Microsoft, esiste una bella soluzione per integrare nelle proprie pagine audio, video e ci\u00f2 che si vuole senza dover andare fuori standard.<\/p>\n<p><strong>Qual&#8217;\u00e8 la soluzione?<\/strong> Come era immaginabile&#8230; la soluzione risiede nel&#8230; <strong>non usare il tag embed!<\/strong><\/p>\n<p>Andiamo dritti al sodo e immaginiamo di voler inserire tra le nostre pagine web un video preso da <a target=\"_blank\" title=\"Youtube\" href=\"https:\/\/www.youtube.com\/\">Youtube<\/a>. Casualmente \ud83d\ude09 sono finito su <a target=\"_blank\" title=\"Youtube - Firefox add\" href=\"https:\/\/www.youtube.com\/v\/xrB8JzMK7dA\">questo simpatico video<\/a> che scherza sull&#8217;arrivo di <a target=\"_blank\" title=\"Mozilla Europe - Firefox\" href=\"https:\/\/www.mozilla.org\/it\/\">Firefox <\/a>sulla terra&#8230;<\/p>\n<p>Il codice che ci fornisce Youtube, di lato al video \u00e8 il seguente:<\/p>\n<pre><code>&lt;object width=&quot;425&quot; height=&quot;350&quot;&gt;<br \/>&lt;param name=&quot;movie&quot; value=&quot;\/\/www.youtube.com\/v\/xrB8JzMK7dA&quot;\/&gt;<br \/>&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;\/&gt;<br \/>&lt;embed xsrc=&quot;\/\/www.youtube.com\/v\/xrB8JzMK7dA&quot;<br \/>type=&quot;application\/x-shockwave-flash&quot; wmode=&quot;transparent&quot;<br \/>width=&quot;425&quot; height=&quot;350&quot;\/&gt;<br \/>&lt;\/object&gt;<\/code><\/pre>\n<p>La soluzione, molto semplicemente, consiste nell&#8217;eliminare quel tag e riscrivere il codice in questo modo:<\/p>\n<pre><code>&lt;object type=&quot;application\/x-shockwave-flash&quot;<br \/>data=&quot;\/\/www.youtube.com\/v\/xrB8JzMK7dA&quot; height=&quot;350&quot; width=&quot;425&quot;&gt;<br \/>&lt;param value=&quot;\/\/www.youtube.com\/v\/xrB8JzMK7dA&quot; name=&quot;movie&quot; \/&gt;<br \/>&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot; \/&gt;<br \/>&lt;\/object&gt;<\/code><\/pre>\n<p>Le informazioni presenti all&#8217;interno del tag embed vengono riportate all&#8217;interno del tag object e il risultato \u00e8 quello che potete vedere sotto:<br \/>\n<iframe loading=\"lazy\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/tRlmP6xWdw0?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><br \/>\nPer il futuro vi baster\u00e0 sostituire il link che vi fornisce Youtube nel suo form-embed ed inserirlo al posto di quello indicato da me nel secondo codice. \ud83d\ude09<\/p>\n<p>La pagina, come potrete controllare da <a title=\"w3c - Html Validator\" target=\"_blank\" href=\"http:\/\/validator.w3.org\/check\/referer\">qui<\/a>, risulter\u00e0 valida secondo gli standard del World Wide Web Consortium.<\/p>\n<p>Ciao,<\/p>\n<p><strong>P|xeL<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In questi giorni si parla di validazione. Sono molti i blog non conformi agli standard del W3c (il World Wide Web Consortium) ed uno dei motivi spesso \u00e8 l&#8217;inclusione all&#8217;interno delle loro pagine di elementi multimediali. Il problema risiede nel &hellip; <a href=\"https:\/\/www.dreamsworld.it\/emanuele\/2007-01-11\/validazione-w3c-con-codici-embed\/\">Leggi ancora &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[4],"tags":[],"class_list":["post-1089","post","type-post","status-publish","format-standard","hentry","category-internet"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/posts\/1089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/comments?post=1089"}],"version-history":[{"count":0,"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/posts\/1089\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/media?parent=1089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/categories?post=1089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/tags?post=1089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}