Extrem Tutorials
Doriți să reacționați la acest mesaj? Creați un cont în câteva clickuri sau conectați-vă pentru a continua.

Extrem TutorialsConectare

Peste 500 tutoriale in limba romana.


Elementele de baza in HTML

power_settings_newConectați-vă pentru a răspunde

31052011
Elementele de baza in HTML

Scrierea tag-urilor (elementelor)
Orice element (tag) se scrie intre 2 paranteze - "<" si ">". Exemplu:

Aproape orice element are si inchidere care se scrie:


Aproape fiecare element are si atribute scrise in interiorul "<" si ">" dupa tag. Si atributele au o valoare. Exemplu:



Structura
Elementul de baza este care are 2 sub-elemente si .
In interiorul tag-ului se poate adauga scripturi, style-uri, meta-taguri etc.
In interiorul tag-ului se adauga tot continutul paginii citit de browser. Tabele, imagini, link-uri, butoane, texte etc.


Prezentare

Cod:


<html>
   <head>
      <title>Titlul paginii web!</title>
      <meta name="description" content="Tutoriale Coding si Web-Design" />
      <meta name="keywords" content="tutoriale,css,html,extrem tutorials" />
   </head>
   <body>
      Continutul paginii!
   </body>
</html>


- Indica inceperea html-ului.
- Un tag in care se adauga denumirea site-ului, descrierea, cuvinte-cheie, style-uri etc.
</strong> - Titlul paginii.<br /><strong><meta></strong> - Este un meta-tag folosit si necesar pentru motoarele de cautare.<br /><strong><body></strong> - Continutul paginii (designul).<br /><br /><strong><meta name="description" content="Tutoriale Coding si Web-Design" /></strong> :<br />- <strong>name="description"</strong> - arata ca acest tag este folosit pentru descrierea site-ului.<br />- <strong>content="Tutoriale Coding si Web-Design"</strong> - intre ghilimele iti poti descrie site-ul.<br /><br /><strong><meta name="keywords" content="tutoriale,css,html,extrem tutorials" /></strong> :<br />- <strong>name="keywords"</strong> - arata ca acest tag este folosit pentru cuvintele cheie ale site-ului.<br />- <strong>content="tutoriale,css,html,extrem tutorials"</strong> - intre ghilimele trebuie sa scrii cuvintele cheie ale site-ului. Acestea afecteaza foarte mult site-ul in motoarele de cautare. Intr-asa mod iti promovezi site-ul. :scoate limba:  La fel conteaza si descrierea.<br /><br />Va rugam sa analizati din nou codul ca sa intelegeti mai bine structura.<br /><br /><span style="font-size: 11px; line-height: normal"> <br /><hr/>Tutorial scris de <strong><span style="color:#f00">[Trebuie sa fiti <a href="/profile?mode=register&/register?redirect=%2Ft2402-elementele-de-baza-in-html">inscris</a> si <a href="/login?/login?redirect=%2Ft2402-elementele-de-baza-in-html">conectat</a> pentru a vedea acest link]</span></strong> <br /><br />Copyright <strong>Extrem-Tutorials.com</strong> - Nici o parte a acestui tutorial nu poate fi reprodusa fara acordul autorului.</span></div><div id="profile9117" class="block-footer"><div class="block-post-details"><div class="block-post-avatar avatar-default"><img loading="lazy" src="https://2img.net/u/1914/11/79/82/avatars/gallery/oaspet11.png" alt="Anonymous" style="max-width: 200px; max-height: 600px" /></div><div class="block-post-footer-details">Vizitato</div></div><ul class="profile-icons"><li class="btn-thank"></li><li class="btn-quote-multi"></li><li class="btn-quote"></li><li class="btn-edit"></li><li class="btn-delete"></li><li class="btn-ip"></li><li class="btn-report"></li></ul></div></div></div><div id="blog_comments"><h2 class="comments-title"><a href="/t2402-elementele-de-baza-in-html#comments" name="comments">Comentarii</a></h2><div class="block"><div class="block-content">Niciun comentariu.</div></div></div><a name="bottomtitle"></a><a href="/login?redirect=%2Fpost%3Ft%3D2402%26amp%3Bmode%3Dreply" rel="nofollow" class="btn-fixed" title="Conectați-vă pentru a răspunde"><i class="material-icons">power_settings_new</i><span class="btn-fixed-txt">Conectați-vă pentru a răspunde</span></a><div class="block block-ptrafic" id="ptrafic_close" style="display: none;"><div class="block-header"><a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><i class="material-icons">add_circle</i></a><span>Subiecte similare</span></div></div><div class="block block-ptrafic" id="ptrafic_open" style="display:'';"><div class="block-header"><a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><i class="material-icons">remove_circle</i></a><span>Subiecte similare</span></div><div class="block-content ptrafic"><a href="/t5378-doom-4-mentionat-in-baza-de-date-steam" title="DOOM 4 menționat în baza de date Steam" ><i class="material-icons">chat_bubble</i>DOOM 4 menționat în baza de date Steam</a><br /><a href="/t6590-extragerea-datelor-din-baza-de-date-phpmysql" title="Extragerea datelor din baza de date, php+mysql" ><i class="material-icons">chat_bubble</i>Extragerea datelor din baza de date, php+mysql</a><br /><a href="/t2401-introducere-html" title="Introducere HTML" ><i class="material-icons">chat_bubble</i>Introducere HTML</a><br /><a href="/t5044-help-overall_header-html" title="Help overall_header.html" ><i class="material-icons">chat_bubble</i>Help overall_header.html</a><br /><a href="/t2081-formular-html" title="Formular HTML" ><i class="material-icons">chat_bubble</i>Formular HTML</a><br /></div></div><a name="quickreply"></a><div class="topic-actions bottom"><div class="topic-actions-buttons"></div></div><form action="/viewforum" method="get" name="jumpbox" onsubmit="if(document.jumpbox.f.value == -1){return false;}"><label><span>Mergi direct la:</span><div class="jumpbox-wrap"><select name="selected_id" onchange="if(this.options[this.selectedIndex].value != -1){ forms['jumpbox'].submit() }"><option value="-1">Selecteaza un forum</option><option value="-1"></option><option value="-1">|</option><option txt="foro" value="c7">|-- General</option><option txt="foro" value="f44">|   |--Noutăți și informații</option><option txt="foro" value="f28">|   |--Prezentare membri</option><option txt="foro" value="f20">|   |--Propuneri forum</option><option value="-1">|   </option><option txt="foro" value="c2">|-- Tutoriale și ponturi</option><option txt="foro" value="f7">|   |--Sisteme de operare</option><option txt="foro" value="f13">|   |   |--Freeware</option><option value="-1">|   |   </option><option txt="foro" value="f54">|   |--Programare si dezvoltare</option><option txt="foro" value="f56">|   |   |--HTML</option><option txt="foro" value="f57">|   |   |--CSS</option><option txt="foro" value="f98">|   |   |--PHP / MySQL</option><option txt="foro" value="f58">|   |   |--Javascript</option><option value="-1">|   |   </option><option txt="foro" value="f15">|   |--Photoshop și design</option><option txt="foro" value="f11">|   |--Componente hardware</option><option txt="foro" value="f2">|   |--Optimizare website (SEO)</option><option txt="foro" value="f6">|   |--Jocuri & Console</option><option txt="foro" value="f17">|   |   |--Action / Shooters</option><option txt="foro" value="f36">|   |   |   |--Counter Strike</option><option value="-1">|   |   |   </option><option txt="foro" value="f22">|   |   |--MMORPGs</option><option txt="foro" value="f33">|   |   |   |--League of Legends</option><option value="-1">|   |   |   </option><option txt="foro" value="f16">|   |   |--Minecraft</option><option txt="foro" value="f49">|   |   |--San Andreas:MP</option><option value="-1">|   |   </option><option txt="foro" value="f21">|   |--Propune tutoriale</option><option value="-1">|   </option><option txt="foro" value="c1">|-- Discuții generale</option><option txt="foro" value="f1">|   |--Știri diverse</option><option txt="foro" value="f50">|   |--Telefoane și tablete</option><option txt="foro" value="f19">|   |--Jocuri</option><option txt="foro" value="f34">|   |--Muzică si filme</option><option txt="foro" value="f3">|   |--Mult mai mult de atat</option><option txt="foro" value="f18">|       |--Joculețe forumiste</option><option txt="foro" value="f30">|       |--Chestionare</option><option value="-1">|   </option><option txt="foro" value="c6">|-- Alte servicii</option><option txt="foro" value="f10">|   |--Probleme legate de script/cod</option><option txt="foro" value="f27">|   |   |--Arhiva script-uri</option><option value="-1">|   |   </option><option txt="foro" value="f12">|   |--Cerere script/pagina HTML</option><option txt="foro" value="f53">|   |--Sabloane (Pagini HTML)</option><option txt="foro" value="f25">|   |--Creatii grafice</option><option txt="foro" value="f5">|   |   |--Galerie forum</option><option value="-1">|   |   </option><option txt="foro" value="f32">|   |--Stilurile platformei</option><option txt="foro" value="f39">|   |   |--Stiluri phpBB</option><option value="-1">|   |   </option><option txt="foro" value="f9">|   |--Cereri imagini</option><option value="-1">|   </option><option txt="foro" value="c3">|--Zona premium</option><option txt="foro" value="f23">    |--Resurse Forumgratuit</option><option txt="foro" value="f29">    |--Resurse grafice</option><option txt="foro" value="f4">        |--Fisiere .PSD</option></select><input type="hidden" name="tid" value="fde0bbea9506394ee9800998ecf8427e" /><input class="btn btn-default" type="submit" value="Mergi la" /></div></label></form><div class="block"><div class="block-header"><i class="material-icons">privacy_tip</i> <strong>Permisiunile acestui forum:</strong></div><div class="block-content"><strong>Nu puteti</strong> raspunde la subiectele acestui forum<br /></div></div><script type="text/javascript">//<![CDATA[ $(resize_images({ 'selector' : '.postbody .content', 'max_width' : 500, 'max_height' : 350 }));//]]></script><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/railscasts.min.css"><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/languages/go.min.js"></script><script>$(document).ready(function() {$('pre, code').each(function(i, block) {hljs.highlightBlock(block);});});</script><div class="52da" style="overflow:visible"><span class="corners-top"><span></span></span><div class="inner"><div align="center"> <div style="text-align:center; display:inline-block; margin:0 auto;"> <table border="0" cellspacing="0" cellpadding="0" style="padding:0; margin:0; border:none;"> <tbody> <tr> <td valign="top" style="padding:32px 32px; "> <script type="text/javascript">//<![CDATA[ function AT_adFillSlot(){document.write('<scr'+'ipt type="text/javascript">GA_googleFillSlotWithSize("pub-6076490735402665", "300x250", 300, 250);</scr'+'ipt>');}//]]> </script><div id='prebid0ro300x250' class='y673f9234b2268'></div></td> <td valign="top" style="padding:32px 32px; "> <script type="text/javascript">//<![CDATA[ function AT_adFillSlot(){document.write('<scr'+'ipt type="text/javascript">GA_googleFillSlotWithSize("pub-6076490735402665", "300x250", 300, 250);</scr'+'ipt>');}//]]> </script><div id='prebid1ro300x250' class='p673f9234b22aa'></div></td> </tr> </tbody> </table> </div></div></div><span class="corners-bottom"><span></span></span></div><div style="height:3px"></div></div><!-- <div id="wrap" /> --><div id="right" class="wrap" style="display: none"><div class="box"><div class="box-head"><i class="material-icons">show_chart</i><span>Cuvinte-cheie</span></div><div class="box-body"><a href="/s/edit" style="font-size: 21px !important;">edit</a>  </div></div><div style="height:1px"></div><div class="box"><div class="box-head"><i class="material-icons">chat</i><span>Ultimele subiecte</span></div><div class="box-body"><div class="mod-recent-row"><a href="/t7215-10-king#39466" class="mod-recent-title" >10 King</a><span class="mod-recent-info"><span class="mod-recent-time"><i class="material-icons">access_time</i><span>Vin 29 Mar - 16:31</span></span><span class="mod-recent-author"><i class="material-icons">person</i>Erpel</span></span><!-- <a href=""></a> Vin 29 Mar - 16:31<br /><br />--></div><div class="mod-recent-row"><a href="/t6824-ying-yang-tutorial#39462" class="mod-recent-title" >Ying-Yang Tutorial</a><span class="mod-recent-info"><span class="mod-recent-time"><i class="material-icons">access_time</i><span>Mar 24 Apr - 11:34</span></span><span class="mod-recent-author"><i class="material-icons">person</i>Lucifer</span></span><!-- <a href=""></a> Mar 24 Apr - 11:34<br /><br />--></div><div class="mod-recent-row"><a href="/t6968-avatar-forumotion-toolbar#39461" class="mod-recent-title" >Avatar forumotion toolbar</a><span class="mod-recent-info"><span class="mod-recent-time"><i class="material-icons">access_time</i><span>Mar 24 Apr - 11:33</span></span><span class="mod-recent-author"><i class="material-icons">person</i>Lucifer</span></span><!-- <a href=""></a> Mar 24 Apr - 11:33<br /><br />--></div><div class="mod-recent-row"><a href="/t7531-salutare#39460" class="mod-recent-title" >Salutare</a><span class="mod-recent-info"><span class="mod-recent-time"><i class="material-icons">access_time</i><span>Mar 24 Apr - 11:32</span></span><span class="mod-recent-author"><i class="material-icons">person</i>Lucifer</span></span><!-- <a href=""></a> Mar 24 Apr - 11:32<br /><br />--></div><div class="mod-recent-row"><a href="/t1886-cum-sa-iti-maresti-viteza-internetului-simplu-windows#39459" class="mod-recent-title" >Cum sa iti maresti viteza internetului simplu (Windows)</a><span class="mod-recent-info"><span class="mod-recent-time"><i class="material-icons">access_time</i><span>Vin 6 Apr - 6:08</span></span><span class="mod-recent-author"><i class="material-icons">person</i>MihaiExtremTutorials</span></span><!-- <a href=""></a> Vin 6 Apr - 6:08<br /><br />--></div></div></div><div style="height:1px"></div><div class="box"><div class="box-head"><i class="material-icons">assignment_ind</i><span>Conectare</span></div><div class="box-body"><form action="/login" method="post"><input placeholder="Utilizator" type="text" tabindex="1" name="username" id="username" size="20" maxlength="40" value="" class="inputbox" /><input placeholder="Parola" type="password" tabindex="2" id="password" name="password" size="20" maxlength="64" class="inputbox" /><label><span class="checkbox"><input type="checkbox" name="autologin" id="autologin" tabindex="4" checked="checked" /><span class="checkbox-check"></span></span><span>Conectare automată</span></label><input style="display: block;margin: auto;" type="submit" name="login" tabindex="6" value="Conectare" class="btn btn-default" /> <a style="height:auto; display:block;margin:auto;width:fit-content" href="/profile?mode=sendpassword" class="btn btn-flat" rel="nofollow">Mi-am uitat parola</a></form></div></div><div style="height:1px"></div><div class="box"><div class="box-head"><i class="material-icons">new_releases</i><span>Cei mai activi postatori ai lunii</span></div><div class="box-body"><div class="mod-top">Niciun utilizator</div></div></div><div style="height:1px"></div><div class="box"><a name="sondage"></a><div class="box-head"><i class="material-icons">poll</i><span>Sondaj</span></div><div class="box-body poll"><div class="mod-poll"><div class="mod-poll-question">Va place forumu nostru?</div><div class="mod-poll-body"><div class="mod-poll-opt"><div class="mod-poll-answer">Imi place</div><div class="mod-poll-result">74% / 148</div><div class="mod-poll-bar" style="width: 74%;"></div></div><div class="mod-poll-opt"><div class="mod-poll-answer">Mai trebuie lucrat la el</div><div class="mod-poll-result">9% / 19</div><div class="mod-poll-bar" style="width: 9%;"></div></div><div class="mod-poll-opt"><div class="mod-poll-answer">Nu imi place</div><div class="mod-poll-result">17% / 34</div><div class="mod-poll-bar" style="width: 17%;"></div></div></div></div><div class="module-footer">Total voturi: 201</div></div></div><div style="height:1px"></div><div class="box"><div class="box-head"><i class="material-icons">whatshot</i><span>Subiectele cele mai active</span></div><div class="box-body box-list"><ul><li><a href="/t2110-tabel-anunt-global" title="Tabel Anunt Global - 127 Raspunsuri"><i class="material-icons">subject</i><span>Tabel Anunt Global</span></a></li><li><a href="/t2288-sliding-menu-bar-v5" title="Sliding Menu Bar V5 - 107 Raspunsuri"><i class="material-icons">subject</i><span>Sliding Menu Bar V5</span></a></li><li><a href="/t3638-creatii-grafice-bogdan" title="Creatii Grafice - Bogdan - 82 Raspunsuri"><i class="material-icons">subject</i><span>Creatii Grafice - Bogdan</span></a></li><li><a href="/t2199-categorii-retractabile" title="Categorii retractabile - 81 Raspunsuri"><i class="material-icons">subject</i><span>Categorii retractabile</span></a></li><li><a href="/t3069-meniu-asemanator-cu-sexy-drop-down-menu-pe-prosilver-si-phpbb3" title="Meniu asemanator cu sexy drop down menu pe prosilver si phpbb3 - 72 Raspunsuri"><i class="material-icons">subject</i><span>Meniu asemanator cu sexy drop down menu pe prosilver si phpbb3</span></a></li><li><a href="/t6965-animate-recent-topic-ipb" title="[Animate] Recent Topic IPB - 61 Raspunsuri"><i class="material-icons">subject</i><span>[Animate] Recent Topic IPB</span></a></li><li><a href="/t4489-portofoliu-loby" title="Portofoliu - Loby - 60 Raspunsuri"><i class="material-icons">subject</i><span>Portofoliu - Loby</span></a></li><li><a href="/t6530-hai-la-un-fazan" title="Hai la un "fazan" - 55 Raspunsuri"><i class="material-icons">subject</i><span>Hai la un "fazan"</span></a></li><li><a href="/t6967-mutare-reclame-forumgratuit-beta" title="Mutare Reclame ForumGratuit [Beta] - 54 Raspunsuri"><i class="material-icons">subject</i><span>Mutare Reclame ForumGratuit [Beta]</span></a></li><li><a href="/t3603-creatii-grafice-franta" title="Creatii Grafice - franta - 52 Raspunsuri"><i class="material-icons">subject</i><span>Creatii Grafice - franta</span></a></li></ul></div></div><div style="height:1px"></div></div><div id="page-footer"><div class="wrap"><div class="navbar"><ul class="linklist clearfix"><li class="footer-to-top"><a href="#top"><i class="material-icons">arrow_upward</i></a></li><li class="footer-home"><a class="icon-home" href="/" accesskey="h">Acasa</a></li><li class="rightside"><strong><a href="https://www.forumgratuit.ro/" target="_blank">Forumgratuit.ro</a></strong> | <span class="gensmall">©</span><a href="https://www.forumgratuit.ro/phpbb" target="_blank">phpBB</a> | <a name="bottom" href="https://help.forumgratuit.ro/" target="_blank">Forum gratuit de suport</a> | <a href="/abuse?page=%2Ft2402-elementele-de-baza-in-html&report=1" rel="nofollow">Semnaleaza un abuz</a> | <a href="javascript:window.Sddan.cmp.displayUI();">Cookies</a> | <strong><a href="/latest" target="_blank">Discuții recente</a></strong></li></ul></div><p class="copyright"></p></div></div><div id="dimmer" class="hidden"></div><div style="display: none;"><div id="fa_hide"></div><div id="fa_show"></div></div><script type="text/javascript">//<![CDATA[ fa_endpage();//]]></script><script type="text/javascript">//<![CDATA[ $(document).ready(function() {function headerAdjust() {var banner_headline = $('#header-banner h1, #header-banner h2'),banner_headline_height = banner_headline.height();if (banner_headline_height > 90) {banner_headline.css('font-size', parseInt(banner_headline.css('font-size')) - 1 + 'px');requestAnimationFrame(headerAdjust);} else {banner_headline.css('opacity', 1);}}requestAnimationFrame(headerAdjust);if(_userdata['session_logged_in']) {if (!FA.Notification.registered()) {FA.Notification.register();}Toolbar.init;var timeout = setInterval(reloadNotif, 1000);};function reloadNotif() {if (_toolbar.notifications.unread > 0) {if (!$("#unread_notif").length) {$("#header-notif > i").before('<span id="unread_notif">' + _toolbar.notifications.unread + '</span>');$('#menu_notifications > span').before('<span id="unread_notif_menu">' + _toolbar.notifications.unread + '</span>');}var unread_notif = $("#unread_notif");var unread_notif_menu = $("#unread_notif_menu");unread_notif.html(_toolbar.notifications.unread);unread_notif_menu.html(_toolbar.notifications.unread);if(! unread_notif.hasClass("notification-new")) {unread_notif.addClass('notification-new');unread_notif_menu.addClass('notification-new');$("#mNotificationBtn").addClass('notification-new');}} else if ($("#unread_notif").length) {$("#unread_notif, #unread_notif_menu").remove();}};var scroll_top = $('html').scrollTop();});//]]></script><script type="text/javascript" src="https://illiweb.com/rs3/87/frm/awesome/main.js"></script><script type="text/javascript"> var vglnk = { key: '9019de09e2fbd24ca1be00a9fededd9e' }; (function(d, t) { var s = d.createElement(t); s.type = 'text/javascript'; s.async = true; s.src = '//cdn.viglink.com/api/vglnk.js'; var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r); }(document, 'script')); </script> <script async src="https://ac.audiencerun.com/j/tag.js" data-arun-z="327yqx5vf9" data-arun-a="1" data-arun-cb="%%CACHEBUSTER%%" data-arun-vu="%%VIEW_URL_UNESC%%" data-arun-pm="%%PREVIEW_MODE%%" data-arun-site="%%SITE%%" data-arun-url="%%PATTERN:url%%" > </script><script> const FAILSAFE_TIMEOUT = 6600 ; const PREBID_TIMEOUT = 6000 ; let adUnits = [ { "code": "prebid0ro300x250", "mediaTypes": { "banner": { "sizes": [ [ 300, 250 ] ] } }, "bids": [ { "bidder": "criteo", "params": { "networkId": 8377 } } ], "custom_fallback": " <scr' + 'ipt src=\"https:\/\/www.googletagservices.com\/tag\/js\/gpt.js\"> googletag.pubads().definePassback(\"\/3324476\/300x250\", [300, 250]).set(\"page_url\", \"https:\/\/extrem-tutorials.forum.st\/t2402-elementele-de-baza-in-html\").setTargeting(\"page_domain\", \"forum.st\").display(); <\/scr' + 'ipt> ", "custom_width": 300, "custom_height": 250 }, { "code": "prebid1ro300x250", "mediaTypes": { "banner": { "sizes": [ [ 300, 250 ] ] } }, "bids": [ { "bidder": "criteo", "params": { "networkId": 8377 } } ], "custom_fallback": " <scr' + 'ipt src=\"https:\/\/www.googletagservices.com\/tag\/js\/gpt.js\"> googletag.pubads().definePassback(\"\/3324476\/300x250\", [300, 250]).set(\"page_url\", \"https:\/\/extrem-tutorials.forum.st\/t2402-elementele-de-baza-in-html\").setTargeting(\"page_domain\", \"forum.st\").display(); <\/scr' + 'ipt> ", "custom_width": 300, "custom_height": 250 }, { "code": "prebid0ro728x90", "mediaTypes": { "banner": { "sizes": [ [ 728, 90 ] ] } }, "bids": [ { "bidder": "criteo", "params": { "networkId": 8377 } } ], "custom_fallback": " <scr' + 'ipt src=\"https:\/\/www.googletagservices.com\/tag\/js\/gpt.js\"> googletag.pubads().definePassback(\"\/3324476\/728x90-top\", [728, 90]).set(\"page_url\", \"https:\/\/extrem-tutorials.forum.st\/t2402-elementele-de-baza-in-html\").setTargeting(\"page_domain\", \"forum.st\").display(); <\/scr' + 'ipt> ", "custom_width": 728, "custom_height": 90 }, { "code": "prebid0ro180x150", "mediaTypes": { "banner": { "sizes": [ [ 180, 150 ] ] } }, "bids": [ { "bidder": "criteo", "params": { "networkId": 8377 } } ], "custom_fallback": "", "custom_width": 180, "custom_height": 150 } ] ; adUnits = adUnits.filter(adUnit => document.querySelector('#' + adUnit.code)); var pbjs = pbjs || {}; pbjs.que = pbjs.que || []; function renderWinningBidOrFallback(adUnit) { var winningBid = pbjs.getHighestCpmBids(adUnit.code)[0]; let iframe = document.createElement('iframe'); iframe.style.border = 'none'; iframe.scrolling = 'no'; iframe.width = adUnit.custom_width + 'px'; iframe.height = adUnit.custom_height + 'px'; iframe.allowtransparency = "true"; iframe.hspace = "0"; iframe.marginWidth = "0"; iframe.marginHeight = "0"; iframe.vspace = "0"; iframe.frameBorder = "0"; document.getElementById(adUnit.code).appendChild(iframe); if (winningBid && winningBid.cpm > 0) { var iframeDoc = iframe.contentWindow.document; iframeDoc.open(); iframeDoc.write('<style>body{margin:0;padding:0;}</style>'); iframeDoc.close(); pbjs.renderAd(iframeDoc, winningBid.adId); } else { let fallback_html = '<style>body{margin:0;padding:0;}</style>' + adUnit.custom_fallback.replaceAll("scr' + 'ipt", "script"); iframe.contentDocument.open(); iframe.contentDocument.write(fallback_html); iframe.contentDocument.close(); } } const sendAdserverRequest = () => { if (pbjs.adserverRequestSent) return; pbjs.adserverRequestSent = true; adUnits.forEach(function(adUnit) { renderWinningBidOrFallback(adUnit); }); }; const requestBids = () => { pbjs.adserverRequestSent = false; pbjs.requestBids({ bidsBackHandler: sendAdserverRequest, timeout: PREBID_TIMEOUT }); }; pbjs.que.push(() => { pbjs.setConfig({ "userSync": { "syncEnabled": true, "userIds": [ { "name": "criteo" } ], "syncsPerBidder": 3, "syncDelay": 3000, "topics": { "maxTopics": 5, "vendors": [ "criteo" ] } }, "consentManagement": { "gdpr": { "cmpApi": "iab", "timeout": 500, "actionTimeout": 10000, "defaultGdprScope": true, "allowAuctionWithoutConsent": true }, "usp": { "cmpApi": "iab", "timeout": 1000, "allowAuctionWithoutConsent": true } }, "priceGranularity": { "buckets": [ { "precision": 2, "min": 0, "max": 5, "increment": 0.01 }, { "precision": 2, "min": null, "max": 8, "increment": 0.02 }, { "precision": 2, "min": null, "max": 15, "increment": 0.05 }, { "precision": 2, "min": null, "max": 20, "increment": 0.1 }, { "precision": 2, "min": null, "max": 50, "increment": 0.5 } ] }, "bidderSettings": { "criteo": { "storageAllowed": true } }, "paapi": { "enabled": true, "bidders": [ "criteo" ], "defaultForSlots": 1, "gpt": { "configWithTargeting": false } }, "bidderConfig": { "bidders": [ "criteo" ], "config": { "ortb2": { "user": { "ext": { "consent": { "source": "sirdata", "gdprApplies": true }, "data": { "eids": [ { "source": "forum.st", "uids": [ { "id": "d41d8cd98f00b204e9800998ecf8427e", "atype": 3, "ext": { "stype": "hemmd5" } }, { "id": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "atype": 3, "ext": { "stype": "hemsha256" } } ] } ] } } } } } } }); pbjs.addAdUnits(adUnits); requestBids(); }); setTimeout(() => { sendAdserverRequest(); }, FAILSAFE_TIMEOUT); </script> <script type="text/javascript">window._taboola = window._taboola || []; _taboola.push({flush: true});</script></body></html>