{"id":211,"date":"2024-06-23T12:24:03","date_gmt":"2024-06-23T12:24:03","guid":{"rendered":"https:\/\/codebox.keyframetechsolution.com\/?p=211"},"modified":"2025-02-15T09:06:38","modified_gmt":"2025-02-15T09:06:38","slug":"responsive-vertical-timeline","status":"publish","type":"post","link":"https:\/\/codebox.keyframetechsolution.com\/responsive-vertical-timeline\/","title":{"rendered":"How to Build a Responsive Vertical Timeline using HTML CSS and JavaScript"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p><span data-preserver-spaces=\"true\">A vertical timeline is a great tool to display events <\/span><span data-preserver-spaces=\"true\">in an engaging format<\/span><span data-preserver-spaces=\"true\">. <\/p>\n<p>Whether <\/span><span data-preserver-spaces=\"true\">you&#8217;re<\/span><span data-preserver-spaces=\"true\"> showcasing a <\/span><span data-preserver-spaces=\"true\">project&#8217;s<\/span><span data-preserver-spaces=\"true\"> milestones, historical events, or a personal journey, a well-designed timeline adds a touch of creativity to your content. <\/span><\/p>\n<p><span data-preserver-spaces=\"true\">In this tutorial, <\/span><span data-preserver-spaces=\"true\">we&#8217;ll<\/span><span data-preserver-spaces=\"true\"> guide you <\/span><span data-preserver-spaces=\"true\">step by step<\/span><span data-preserver-spaces=\"true\"> to create a responsive vertical timeline using HTML CSS, and JavaScript. <\/span><\/p>\n<p>By the end of this article, you&#8217;ll be able to easily create a timeline that adapts seamlessly to different screen sizes and contains dynamic interactivity to your page.<\/p>\n<p>\u2705\u00a0<strong>Watch Live Preview<\/strong>\u00a0\ud83d\udc49\ud83d\udc49<\/p>\n<p><iframe title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/2kJjzEtfPq8?si=TRcYbSgO71WfDl4y\" width=\"100%\" height=\"450\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><\/p>\n<p><a href=\"#conclusion\">Click Here to Download the Code<\/a><\/p>\n<div class=\"border-blog-highlight\">\n<h2>Table of Contents<\/h2>\n<ul>\n<li><a href=\"#section1\">Introduction to the Timeline Concept<\/a><\/li>\n<li><a href=\"#section2\">Set Up Your Project Folder<\/a><\/li>\n<li><a href=\"#section3\">HTML Code Structure<\/a><\/li>\n<li><a href=\"#section4\">CSS Code Structure<\/a><\/li>\n<li><a href=\"#section5\">JavaScript Code Structure<\/a><\/li>\n<li><a href=\"#conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n<\/div>\n<p><strong>Similar Posts:<\/strong> <a href=\"https:\/\/codebox.keyframetechsolution.com\/vertical-timeline-design\/\">How to Create an Animated Vertical Timeline using HTML CSS and jQuery<\/a><\/p>\n<h2 id=\"section1\"><span data-preserver-spaces=\"true\">Introduction to the Timeline Concept<\/span><\/h2>\n<p><span data-preserver-spaces=\"true\">A vertical timeline is a graphical representation that shows a sequence of events or milestones in a vertical format.\u00a0<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">With the increasing need for dynamic content presentation, timelines have become a popular design pattern, especially for websites showcasing timelines, projects, or historical data.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">This<\/span><span data-preserver-spaces=\"true\"> can be enhanced with images, animations, and interactive features to create an engaging experience for users. <\/p>\n<p>In this guide, <\/span><span data-preserver-spaces=\"true\">I&#8217;ve<\/span><span data-preserver-spaces=\"true\"> used animated photos to make it.<\/span><\/p>\n<h3 id=\"section2\">Set Up Your Project Folder<\/h3>\n<p><span data-preserver-spaces=\"true\">Before diving into the code, <\/span><span data-preserver-spaces=\"true\">let\u2019s<\/span><span data-preserver-spaces=\"true\"> first set up a basic folder structure for our project. <\/span><\/p>\n<p><span data-preserver-spaces=\"true\">We\u2019ll<\/span><span data-preserver-spaces=\"true\"> create three files:<\/span><\/p>\n<ul>\n<li><strong>index.html<\/strong><\/li>\n<li><strong>style.css<\/strong><\/li>\n<li><strong>script.js<\/strong><\/li>\n<\/ul>\n<p><span data-preserver-spaces=\"true\">Let\u2019s<\/span><span data-preserver-spaces=\"true\"> go ahead and set up the following folder structure:<\/span><\/p>\n<h2><span data-preserver-spaces=\"true\">Source Code<\/span><\/h2>\n<h3 id=\"section3\"><strong><span data-preserver-spaces=\"true\">HTML Code Structure<\/span><\/strong><\/h3>\n<div class=\"code-container\">\n<div class=\"toolbar\">\n<div class=\"actions\">\n        <span><\/span><br \/>\n        <span class=\"yellow\"><\/span><br \/>\n        <span class=\"green\"><\/span>\n      <\/div>\n<div class=\"title\">index.html<\/div>\n<\/div>\n<div class=\"code-content\">\n<pre><code class=\"language-markup\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n  &lt;meta charset=\"UTF-8\"&gt;\r\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\r\n  &lt;title&gt;Build a Responsive Vertical Timeline using HTML CSS and JavaScript&lt;\/title&gt;\r\n  &lt;link rel=\"stylesheet\" href=\"style.css\"&gt;\r\n  &lt;link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/4.7.0\/css\/font-awesome.min.css\"&gt;\r\n  &lt;script src=\"https:\/\/code.jquery.com\/jquery-3.5.1.min.js\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/typed.js\/2.0.11\/typed.min.js\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/waypoints\/4.0.1\/jquery.waypoints.min.js\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.0-alpha1\/dist\/css\/bootstrap.min.css\"&gt;&lt;\/script&gt;\r\n  &lt;link rel=\"stylesheet\" href=\"https:\/\/fonts.googleapis.com\/css2?family=Poppins:wght@400;500;600;700&amp;family=Ubuntu:wght@400;500;700&amp;display=swap\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;!-- CODE --&gt;\r\n\r\n&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.0-alpha1\/dist\/js\/bootstrap.bundle.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"script.js\"&gt;&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/code><\/pre>\n<\/div>\n<\/div>\n<h3 id=\"section4\"><strong><span data-preserver-spaces=\"true\">CSS Code Structure<\/span><\/strong><\/h3>\n<div class=\"code-container\">\n<div class=\"toolbar\">\n<div class=\"actions\">\n        <span><\/span><br \/>\n        <span class=\"yellow\"><\/span><br \/>\n        <span class=\"green\"><\/span>\n      <\/div>\n<div class=\"title\">style.css<\/div>\n<\/div>\n<div class=\"code-content\">\n<pre><code class=\"language-markup\">\r\n&lt; \/* Your CSS code here *\/ &gt;\r\n&lt; * { &gt;\r\n\r\n&lt; margin: 0; &gt;\r\n&lt; padding: 0 &gt;\r\n&lt; box-sizing: border-box; &gt;\r\n&lt;     text-decoration: none; &gt;\r\n&lt;     } &gt;\r\n      <\/code><\/pre>\n<\/div>\n<\/div>\n<h3 id=\"section5\">JavaScript Code Structure<\/h3>\n<p>Next, let\u2019s add some interactivity to the timeline. We will use JavaScript to animate the timeline items as the user scrolls down the page. <\/p>\n<p>This makes the timeline more dynamic and engaging.<\/p>\n<div class=\"code-container\">\n<div class=\"toolbar\">\n<div class=\"actions\">\n        <span><\/span><br \/>\n        <span class=\"yellow\"><\/span><br \/>\n        <span class=\"green\"><\/span>\n      <\/div>\n<div class=\"title\">script.js<\/div>\n<\/div>\n<div class=\"code-content\">\n<pre><code class=\"language-markup\">\r\n&lt; \/\/ JavaScript Code &gt;\r\n      <\/code><\/pre>\n<\/div>\n<\/div>\n<p><strong>Also read: <\/strong><a href=\"https:\/\/codebox.keyframetechsolution.com\/border-animation-html-css\/\">How to Create Border Animation using HTML CSS (Source Code)<\/a><\/p>\n<h2 id=\"conclusion\"><span data-preserver-spaces=\"true\">Conclusion<\/span><\/h2>\n<p data-start=\"105\" data-end=\"323\">Congratulations! You\u2019ve just built a responsive vertical timeline by following the step-by-step guide above. <\/p>\n<p>Now, you can create a visually appealing timeline that adapts to different screen sizes using media queries.<\/p>\n<p data-start=\"325\" data-end=\"488\">You can also add interactive features to make the timeline more dynamic. Feel free to further customize it by incorporating images, icons, and advanced animations.<\/p>\n<p data-start=\"490\" data-end=\"655\">Timelines are a fantastic way to present content in a creative, engaging, and organized manner\u2014perfect for websites, portfolios, or personal projects. <\/p>\n<p>Happy coding!<\/p>\n<p><strong><i class=\"fa fa-download\" style=\"color: #046bd2;\"><\/i> 30 people bought this<\/strong><\/p>\n<p><strong>Grab it Now for Just <i class=\"fa fa-rupee\" style=\"color: #046bd2;\"><\/i><span style=\"color: #046bd2;\">50<\/span><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction A vertical timeline is a great tool to display events in an engaging format. Whether you&#8217;re showcasing a project&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":213,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[88],"tags":[343,408,297,409],"class_list":["post-211","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-designs","tag-animated-vertical-timeline","tag-responsive-timeline-html-css","tag-responsive-vertical-timeline","tag-vertical-timeline-html-css-js"],"acf":[],"_links":{"self":[{"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/posts\/211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/comments?post=211"}],"version-history":[{"count":12,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/posts\/211\/revisions"}],"predecessor-version":[{"id":1513,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/posts\/211\/revisions\/1513"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/media\/213"}],"wp:attachment":[{"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/media?parent=211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/categories?post=211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/tags?post=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}