{"id":4715,"date":"2015-06-03T12:15:21","date_gmt":"2015-06-03T09:15:21","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=4715"},"modified":"2017-12-19T13:57:11","modified_gmt":"2017-12-19T11:57:11","slug":"html5-slideshow-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/","title":{"rendered":"HTML5 Slideshow Example"},"content":{"rendered":"<p>In this example, we aim to have a closer look at slideshows with HTML5.<\/p>\n<p>Slideshows are a good way to present a set of images within a part of the website. HTML5 doesn&#8217;t have a native tag or set of tags to make a slideshow, but you can achieve it using other provided tags.<\/p>\n<p>As you can imagine, javascript needs to be used to make transitions smooth and nice, but notice that we can use CSS3 transitions to begin.<\/p>\n<p>As long as we are not using any specific tag related to slideshow, all we are doing will be compatible with all browsers out there.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n[ulp id=&#8217;tgm4cmEWcKUikZNn&#8217;]<\/p>\n<h2>1. Basic Setup<\/h2>\n<p>To begin, go on and create a html file with its basic syntax inside like so:<\/p>\n<pre class=\"brush:xml\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;HTML5 Slideshow Example&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;!-- STYLE SECTION --&gt;\r\n\r\n&lt;style type=\"text\/css\"&gt;\r\n\r\n&lt;\/style&gt;\r\n\r\n&lt;!-- HTML SECTION --&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>Done that, we can start adding html and css towards creating the slideshow.<\/p>\n<h2>2. Creating the Slideshow <\/h2>\n<p>In this section we are going to set up dhe html and css for the slideshow.<\/p>\n<h3>2.1 HTML Setup <\/h3>\n<p>The html structure is going to be like this:<\/p>\n<p>1. A div will wrap the whole slideshow, lets give this div a class of <code>css-slideshow<\/code>.<\/p>\n<p>2. A <code>figure<\/code> tag will wrap one image of the slideshow, it will contain an <code>img<\/code> tag and a <code>figcaption<\/code> tag inside.<\/p>\n<p>3. An <code>img<\/code> tag will specify the image for each slide, it will also have a defined width and height.<\/p>\n<p>4. A <code>figcaption<\/code> tag will contain caption for the image being displayed.<\/p>\n<p>So the structure of our slideshow would be:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;div class=\"css-slideshow\"&gt;\r\n&lt;figure&gt;\r\n\t&lt;img src=\"image.jpg\" width=\"495\" height=\"370\" \/&gt;\r\n\t&lt;figcaption&gt;Caption here&lt;\/figcaption&gt;\r\n&lt;\/figure&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>Now lets populate that with more slides:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;div class=\"css-slideshow\"&gt;\r\n&lt;figure&gt;\r\n\t&lt;img src=\"images\/img1.jpg\" width=\"495\" height=\"370\" \/&gt;\r\n\t&lt;figcaption&gt;&lt;strong&gt;CSS3:&lt;\/strong&gt;Yourr first caption goes here &lt;\/figcaption&gt; \r\n&lt;\/figure&gt;\r\n&lt;figure&gt;\r\n\t&lt;img src=\"images\/img2.jpg\" width=\"495\" height=\"370\" \/&gt;\r\n\t&lt;figcaption&gt;&lt;strong&gt;Slideshow:&lt;\/strong&gt; Your second caption goes here&lt;\/figcaption&gt; \r\n&lt;\/figure&gt;\r\n&lt;figure&gt;\r\n\t&lt;img src=\"images\/img3.jpg\" width=\"495\" height=\"370\" \/&gt;\r\n\t&lt;figcaption&gt;&lt;strong&gt;Offline:&lt;\/strong&gt; Your third caption goes here&lt;\/figcaption&gt; \r\n&lt;\/figure&gt;\r\n&lt;figure&gt;\r\n\t&lt;img src=\"images\/img4.jpg\" width=\"495\" height=\"370\" \/&gt;\r\n\t&lt;figcaption&gt;&lt;strong&gt;Cloud:&lt;\/strong&gt; Your fourth caption goes here&lt;\/figcaption&gt; \r\n&lt;\/figure&gt;\r\n&lt;figure&gt;\r\n\t&lt;img src=\"images\/img5.jpg\" width=\"495\" height=\"370\" \/&gt;\r\n\t&lt;figcaption&gt;&lt;strong&gt;Server:&lt;\/strong&gt; Your fifth caption goes here&lt;\/figcaption&gt; \r\n&lt;\/figure&gt;\r\n&lt;figure&gt;\r\n\t&lt;img src=\"images\/img6.jpg\" width=\"495\" height=\"370\" \/&gt;\r\n\t&lt;figcaption&gt;&lt;strong&gt;Shopping:&lt;\/strong&gt;Your sixth caption goes here&lt;\/figcaption&gt; \r\n&lt;\/figure&gt;\r\n&lt;figure&gt;\r\n\t&lt;img src=\"images\/img7.jpg\" width=\"495\" height=\"370\" \/&gt;\r\n\t&lt;figcaption&gt;&lt;strong&gt;Smartphone:&lt;\/strong&gt; Your seventh caption goes here&lt;\/figcaption&gt; \r\n&lt;\/figure&gt;\r\n&lt;figure&gt;\r\n\t&lt;img src=\"images\/img8.jpg\" width=\"495\" height=\"370\" \/&gt;\r\n\t&lt;figcaption&gt;&lt;strong&gt;Last Caption:&lt;\/strong&gt;Your last caption goes here&lt;\/figcaption&gt; \r\n&lt;\/figure&gt;\r\n\r\n&lt;\/div&gt;  \r\n<\/pre>\n<p>For now, you can only see this in the browser:<br \/>\n<figure id=\"attachment_4724\" aria-describedby=\"caption-attachment-4724\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow1.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow1.jpg\" alt=\"HTML Slideshow Set Up\" width=\"820\" height=\"889\" class=\"size-full wp-image-4724\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow1.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow1-277x300.jpg 277w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-4724\" class=\"wp-caption-text\">HTML Slideshow Set Up<\/figcaption><\/figure><\/p>\n<h3>2.2 CSS3 Styling <\/h3>\n<p>An important part of creating the slideshow is CSS, which gives it a dynamic look. Lets start with the basics:<\/p>\n<p>Below I have set up some styling for the main elements, look at the code below:<\/p>\n<pre class=\"brush:css\">\r\n.css-slideshow {\r\n     position: relative;\t\t\t\/* positioning facilities *\/\r\n     max-width: 495px;\t\t\t\/* maximum width of the image *\/\r\n     height: 370px;\r\n     margin: 1em auto .5em auto;\t\t\t\t\/* some margin *\/\r\n     font-family: \"Montserrat\", sans-serif;\t\/* just a custom font *\/\r\n     font-weight: 300;\t\t\t\t\t\t\/* font-weight, semibold *\/\r\n}\r\n\r\n.css-slideshow figure {\r\n     margin: 0;\t\t\t\t\t\/* ensuring there is no margin *\/\r\n     max-width: 495px;\r\n     height: 370px;\r\n     background: #fff;\t\t\t  \/* white background *\/\r\n     position: absolute;\t\t\t\/* positioning facilities *\/\r\n}\r\n\r\n.css-slideshow img {\t\t\t\t\/* a shadow for our box wrapper *\/\r\n    -webkit-box-shadow: 0 0 2px #666;\r\n     box-shadow: 0 0 2px #666;\r\n}\r\n\r\n\/* Give the figcaption a 0% opacity at first *\/\r\n.css-slideshow figcaption {\r\n    position: absolute;\r\n\ttop: 5px;\r\n\tcolor: #fff;\r\n\tbackground: rgba(0,0,0, .3);\r\n\tfont-size: .8em;\r\n\tpadding: 8px 12px;\r\n\t-ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\r\n\tfilter: alpha(opacity=0);\r\n\topacity: 0;\r\n\t-webkit-transition: opacity .5s;\r\n\t-moz-transition: opacity .5s;\r\n\t-o-transition: opacity .5s;\r\n\t-ms-transition: opacity .5s;\r\n\ttransition: opacity .5s;\t\/* transition duration *\/\r\n}\r\n\r\n\/* Give the figcaption a 100% opacity now *\/\r\n.css-slideshow:hover figure figcaption {\r\n    -webkit-transition: opacity .5s;\r\n\t-moz-transition: opacity .5s;\r\n\t-o-transition: opacity .5s;\r\n\t-ms-transition: opacity .5s;\r\n\ttransition: opacity .5s;\t\t\/* transition duration *\/\r\n\t-ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)\";\r\n\tfilter: alpha(opacity=100);\r\n\topacity: 1;\r\n}\r\n<\/pre>\n<p>Now we got the nice view of the caption over the image that comes with a smooth fade:<br \/>\n<figure id=\"attachment_4727\" aria-describedby=\"caption-attachment-4727\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow2.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow2.jpg\" alt=\"Styling the Caption over the Image\" width=\"820\" height=\"889\" class=\"size-full wp-image-4727\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow2.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow2-277x300.jpg 277w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-4727\" class=\"wp-caption-text\">Styling the Caption over the Image<\/figcaption><\/figure><br \/>\nTime to animate the images when it comes to changing from one image to another. We do that using the <code>nth-child<\/code> selector which will give every element of the parent div specified some specific attributes. Look at the code below:<\/p>\n<pre class=\"brush:css\">\r\n\/* Here every child of css-transition gets animated *\/\r\n\r\n.css-slideshow figure:nth-child(1) {\r\n\t-webkit-animation: xfade 48s 42s  infinite;\r\n\t-moz-animation: xfade 48s 42s  infinite;\r\n\t-ms-animation: xfade 48s 42s infinite;\r\n\t-o-animation: xfade 48s 42s infinite;\r\n\tanimation: xfade 48s 42s infinite;\r\n}\r\n.css-slideshow figure:nth-child(2) {\r\n\t-webkit-animation: xfade 48s 36s infinite;\r\n\t-moz-animation: xfade 48s 36s infinite;\r\n\t-ms-animation: xfade 48s 36s infinite;\r\n\t-o-animation: xfade 48s 36s infinite;\r\n\tanimation: xfade 48s 36s infinite;\r\n}\r\n.css-slideshow figure:nth-child(3) {\r\n\t-webkit-animation: xfade 48s 30s infinite;\r\n\t-moz-animation: xfade 48s 30s infinite;\r\n\t-ms-animation: xfade 48s 30s infinite;\r\n\t-o-animation: xfade 48s 30s infinite;\r\n\tanimation: xfade 48s 30s infinite;\r\n}\r\n.css-slideshow figure:nth-child(4) {\r\n\t-webkit-animation: xfade 48s 24s infinite;\r\n\t-moz-animation: xfade 48s 24s infinite;\r\n\t-ms-animation: xfade 48s 24s infinite;\r\n\t-o-animation: xfade 48s 24s infinite;\r\n\tanimation: xfade 48s 24s infinite;\r\n}\r\n.css-slideshow figure:nth-child(5) {\r\n\t-webkit-animation: xfade 48s 18s infinite;\r\n\t-moz-animation: xfade 48s 18s infinite;\r\n\t-ms-animation: xfade 48s 18s infinite;\r\n\t-o-animation: xfade 48s 18s infinite;\r\n\tanimation: xfade 48s 18s infinite;\r\n}\r\n.css-slideshow figure:nth-child(6) {\r\n\t-webkit-animation: xfade 48s 12s infinite;\r\n\t-moz-animation: xfade 48s 12s infinite;\r\n\t-ms-animation: xfade 48s 12s infinite;\r\n\t-o-animation: xfade 48s 12s infinite;\r\n\tanimation: xfade 48s 12s infinite;\r\n}\r\n.css-slideshow figure:nth-child(7) {\r\n\t-webkit-animation: xfade 48s 6s infinite;\r\n\t-moz-animation: xfade 48s 6s infinite;\r\n\t-ms-animation: xfade 48s 6s infinite;\r\n\t-o-animation: xfade 48s 6s infinite;\r\n\tanimation: xfade 48s 6s infinite;\r\n}\r\n.css-slideshow figure:nth-child(8) {\r\n\t-webkit-animation: xfade 48s 0s infinite;\r\n\t-moz-animation: xfade 48s 0s infinite;\r\n\t-ms-animation: xfade 48s 0s infinite;\r\n\t-o-animation: xfade 48s 0s infinite;\r\n\tanimation: xfade 48s 0s infinite;\r\n}\r\n<\/pre>\n<p>Well, it might seem such a long code, but it is just the css3 xfade attribute value and compatibility for all browsers.<\/p>\n<p>You don&#8217;t see any changes after this code? It is obvious, because we animated images, but did not tell them when to do so and for how long one image should be on screen. Here is where CSS3 keyframes make a huge difference.<\/p>\n<p>You declare a keyframe using <code>@keyframe<\/code> and then enter the attribute value you want keyframes on like <code>\"xfade\"<\/code>.<\/p>\n<pre class=\"brush:css\">\r\n@keyframes \"xfade\" {\r\n 0% {\r\n    -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)\";\r\n   \tfilter: alpha(opacity=100);\r\n   \topacity: 1;\r\n }\r\n14.67% {\r\n\t-ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)\";\r\n\tfilter: alpha(opacity=100);\r\n\topacity: 1;\r\n}\r\n16.67% {\r\n\t-ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\r\n\tfilter: alpha(opacity=0);\r\n\topacity: 0;\r\n}\r\n 98% {\r\n    -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\r\n   \tfilter: alpha(opacity=0);\r\n   \topacity: 0;\r\n }\r\n 100% {\r\n    -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)\";\r\n   \tfilter: alpha(opacity=100);\r\n   \topacity: 1;\r\n }\r\n}\r\n@-moz-keyframes xfade {\r\n 0% {\r\n   filter: alpha(opacity=100);\r\n   opacity: 1;\r\n }\r\n14.67% {\r\n\tfilter: alpha(opacity=100);\r\n\topacity: 1;\r\n}\r\n16.67% {\r\n\tfilter: alpha(opacity=0);\r\n\topacity: 0;\r\n}\r\n 98% {\r\n   filter: alpha(opacity=0);\r\n   opacity: 0;\r\n }\r\n 100% {\r\n   filter: alpha(opacity=100);\r\n   opacity: 1;\r\n }\r\n}\r\n<\/pre>\n<p>The percentages you see above represent the animation duration. You can have as many as you like.<\/p>\n<p>To make keyframes cross-browser compatible note the following:<br \/>\n<code>@-webkit-keyframes<\/code>, <code>@-ms-keyframes<\/code>, <code>@-o-keyframes<\/code><\/p>\n<p>Looks like we&#8217;re done, now we have an eight image slideshow preprogrammed to show slides on certain timeframes.<\/p>\n<p>The slideshow won&#8217;t look like below, this is just the images\/slides that show (more than 3):<br \/>\n<figure id=\"attachment_4736\" aria-describedby=\"caption-attachment-4736\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow3.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow3.jpg\" alt=\"Slideshow Slides\" width=\"820\" height=\"812\" class=\"size-full wp-image-4736\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow3.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow3-150x150.jpg 150w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow3-300x297.jpg 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow3-70x70.jpg 70w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-4736\" class=\"wp-caption-text\">Slideshow Slides<\/figcaption><\/figure><\/p>\n<p>That was it, now you have to try it in your browser to see the real result.<\/p>\n<h2>3. Javascript Alternative Slideshows <\/h2>\n<p>Well, javascript makes it ultimate with slideshows. There are a lot of beautifully designed slideshows on the internet and one page I would suggest is <a href=\"http:\/\/kenwheeler.github.io\/slick\/\">http:\/\/kenwheeler.github.io\/slick\/<\/a>.<\/p>\n<p>There, you can find some of the following slideshow designs:<br \/>\n<figure id=\"attachment_4738\" aria-describedby=\"caption-attachment-4738\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow4.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow4.jpg\" alt=\"Javascript Slideshows\" width=\"820\" height=\"917\" class=\"size-full wp-image-4738\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow4.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/slideshow4-268x300.jpg 268w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-4738\" class=\"wp-caption-text\">Javascript Slideshows<\/figcaption><\/figure><\/p>\n<h2>4. Conclusion <\/h2>\n<p>To conclude, slideshows are a smart way to show several images within a page and let them show time after time.<\/p>\n<p>However, depending on the type you need, you might have to use javascript to beautify some things in it.<\/p>\n<p>For a normal, maybe blog use of the slideshow, I would recomment the HTML5 and CSS3 slideshow with no extra js.<\/p>\n<p>It is not that good to load your page with a lot of js, however if this is the only element who needs it, just use it.<\/p>\n<h2>5. Download<\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/05\/HTML5-Slideshow.zip\"><strong>HTML5 Slideshow<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this example, we aim to have a closer look at slideshows with HTML5. Slideshows are a good way to present a set of images within a part of the website. HTML5 doesn&#8217;t have a native tag or set of tags to make a slideshow, but you can achieve it using other provided tags. As &hellip;<\/p>\n","protected":false},"author":75,"featured_media":914,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-4715","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html5"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>HTML5 Slideshow Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"In this example, we aim to have a closer look at slideshows with HTML5. Slideshows are a good way to present a set of images within a part of the website.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTML5 Slideshow Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"In this example, we aim to have a closer look at slideshows with HTML5. Slideshows are a good way to present a set of images within a part of the website.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/fabiocimo\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-03T09:15:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-19T11:57:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Fabio Cimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fabiocimo\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fabio Cimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/\"},\"author\":{\"name\":\"Fabio Cimo\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\"},\"headline\":\"HTML5 Slideshow Example\",\"datePublished\":\"2015-06-03T09:15:21+00:00\",\"dateModified\":\"2017-12-19T11:57:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/\"},\"wordCount\":705,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"articleSection\":[\"HTML5\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/\",\"name\":\"HTML5 Slideshow Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"datePublished\":\"2015-06-03T09:15:21+00:00\",\"dateModified\":\"2017-12-19T11:57:11+00:00\",\"description\":\"In this example, we aim to have a closer look at slideshows with HTML5. Slideshows are a good way to present a set of images within a part of the website.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML5\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/html5\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"HTML5 Slideshow Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\",\"name\":\"Fabio Cimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"caption\":\"Fabio Cimo\"},\"description\":\"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.\",\"sameAs\":[\"https:\/\/www.facebook.com\/fabiocimo\",\"https:\/\/al.linkedin.com\/in\/fabiocimo\",\"https:\/\/x.com\/fabiocimo\",\"https:\/\/www.youtube.com\/fabiocimo1\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HTML5 Slideshow Example - Web Code Geeks - 2026","description":"In this example, we aim to have a closer look at slideshows with HTML5. Slideshows are a good way to present a set of images within a part of the website.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/","og_locale":"en_US","og_type":"article","og_title":"HTML5 Slideshow Example - Web Code Geeks - 2026","og_description":"In this example, we aim to have a closer look at slideshows with HTML5. Slideshows are a good way to present a set of images within a part of the website.","og_url":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/fabiocimo","article_published_time":"2015-06-03T09:15:21+00:00","article_modified_time":"2017-12-19T11:57:11+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","type":"image\/jpeg"}],"author":"Fabio Cimo","twitter_card":"summary_large_image","twitter_creator":"@fabiocimo","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Fabio Cimo","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/"},"author":{"name":"Fabio Cimo","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22"},"headline":"HTML5 Slideshow Example","datePublished":"2015-06-03T09:15:21+00:00","dateModified":"2017-12-19T11:57:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/"},"wordCount":705,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","articleSection":["HTML5"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/","url":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/","name":"HTML5 Slideshow Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","datePublished":"2015-06-03T09:15:21+00:00","dateModified":"2017-12-19T11:57:11+00:00","description":"In this example, we aim to have a closer look at slideshows with HTML5. Slideshows are a good way to present a set of images within a part of the website.","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-slideshow-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"HTML5","item":"https:\/\/www.webcodegeeks.com\/category\/html5\/"},{"@type":"ListItem","position":3,"name":"HTML5 Slideshow Example"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22","name":"Fabio Cimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","caption":"Fabio Cimo"},"description":"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.","sameAs":["https:\/\/www.facebook.com\/fabiocimo","https:\/\/al.linkedin.com\/in\/fabiocimo","https:\/\/x.com\/fabiocimo","https:\/\/www.youtube.com\/fabiocimo1"],"url":"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/4715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=4715"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/4715\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/914"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=4715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=4715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=4715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}