HowTo Home


Icon Bar Menu Icon Accordion Tabs Vertical Tabs Tab Headers Full Page Tabs Top Navigation Responsive Topnav Search Bar Fixed Sidebar Side Navigation Fullscreen Navigation Off-Canvas Menu Hover Sidenav Buttons Horizontal Scroll Menu Vertical Menu Bottom Navigation Responsive Bottom Nav Bottom Border Nav Links Right Aligned Menu Links Fixed Menu Slide Down Bar on Scroll Hide Navbar on Scroll Sticky Navbar Hover Dropdowns Click Dropdowns Dropdown in Topnav Dropdown in Sidenav Resp Navbar Dropdown Dropup Mega Menu Pagination Breadcrumbs Button Group Vertical Button Group Sticky Social Bar Responsive Header


Slideshow Slideshow Gallery Modal Images Lightbox Responsive Image Grid Image Grid Tab Gallery Image Overlay Fade Image Overlay Slide Image Overlay Zoom Image Overlay Title Image Overlay Icon Image Effects Black and White Image Image Text Image Text Blocks Transparent Image Text Full Page Image Hero Image Side-by-Side Images Rounded Images Avatar Images Responsive Images Center Images Thumbnails Meet the Team Sticky Image Flip an Image Shake an Image Portfolio Gallery Portfolio with Filtering Image Zoom Image Magnifier Glass Image Comparison Slider


Alert Buttons Outline Buttons Split Buttons Animated Buttons Fading Buttons Button on Image Social Media Buttons Loading Buttons Icon Buttons Next/prev Buttons Block Buttons Text Buttons Round Buttons Scroll To Top Button


Login Form Signup Form Checkout Form Contact Form Newsletter Responsive Form Clear Input Field Copy Text to Clipboard Animated Search Search Button Fullscreen Search Custom Checkbox/Radio Custom Select Toggle Switch Check Checkbox Password Validation Toggle Password Visibility Multiple Step Form Autocomplete


Filter List Filter Table Filter Elements Filter Dropdown Sort List Sort Table


Zebra Striped Table Responsive Tables Comparison Table


Fullscreen Video Modal Boxes Timeline Scroll Indicator Progress Bars Skill Bar Range Sliders Tooltips Popups Collapsible Calendar HTML Includes To Do List Loaders Star Rating User Rating Overlay Effect Contact Chips Cards Profile Card Alerts Notes Labels Circles Coupon Responsive Text Fixed Footer Equal Height Clearfix Snackbar Scroll Drawing Sticky Header Pricing Table Parallax Aspect Ratio Toggle Like/Dislike Toggle Hide/Show Toggle Text Toggle Class Add Class Remove Class Active Class Zoom Hover Arrows Shapes Browser Window Custom Scrollbar Device Look Placeholder Color Vertical Line Animate Icons Countdown Timer Typewriter Coming Soon Page Chat Messages Split Screen Testimonials Quotes Slideshow Closable List Items Typical Device Breakpoints Draggable HTML Element Trigger Button on Enter JS Media Queries Syntax Highlighter JS Animations Get Iframe Elements


Make a Website Make a Website (W3.CSS) Make a Website (BS3) Make a Website (BS4) Center Website Contact Section


2 Column Layout 3 Column Layout 4 Column Layout Expanding Grid List Grid View Mixed Column Layout Blog Layout


Google Maps Google Maps BW Google Translate Google Charts Google Fonts


Convert Weight Convert Temperature Convert Length Convert Speed

How TO - Coming Soon Page

Learn how to create a "coming soon page" with CSS and JavaScript.

Try it Yourself »

How To Create a Coming Soon Page

Step 1) Add HTML:

In our example, we will use a background image that covers the entire page and place some text in the image to let the user know what's going on.

This example shows how to create a "Coming Soon Page" with just HTML and CSS. Look at the next example to find out how to add a "countdown timer" with JavaScript as well.


<div class="bgimg">
  <div class="topleft">
  <div class="middle">
    <h1>COMING SOON</h1>
    <p>35 days</p>
  <div class="bottomleft">
    <p>Some text</p>

Step 2) Add CSS:


/* Set height to 100% for body and html to enable the background image to cover the whole page: */
body, html {
    height: 100%

.bgimg {
    /* Background image */
    background-image: url('/w3images/forestbridge.jpg');
    /* Full-screen */
    height: 100%;
    /* Center the background image */
    background-position: center;
    /* Scale and zoom in the image */
    background-size: cover;
    /* Add position: relative to enable absolutely positioned elements inside the image (place text) */
    position: relative;
    /* Add a white text color to all elements inside the .bgimg container */
    color: white;
    /* Add a font */
    font-family: "Courier New", Courier, monospace;
    /* Set the font-size to 25 pixels */
    font-size: 25px;

/* Position text in the top-left corner */
.topleft {
    position: absolute;
    top: 0;
    left: 16px;

/* Position text in the bottom-left corner */
.bottomleft {
    position: absolute;
    bottom: 0;
    left: 16px;

/* Position text in the middle */
.middle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;

/* Style the <hr> element */
hr {
    margin: auto;
    width: 40%;
Try it Yourself »
Step 3) Add JavaScript

Add JavaScript to create a countdown timer:


// Set the date we're counting down to
var countDownDate = new Date("Jan 5, 2019 15:37:25").getTime();

// Update the count down every 1 second
var x = setInterval(function() {

  // Get todays date and time
  var now = new Date().getTime();

  // Find the distance between now an the count down date
  var distance = countDownDate - now;

  // Time calculations for days, hours, minutes and seconds
  var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  var seconds = Math.floor((distance % (1000 * 60)) / 1000);

  // Display the result in an element with id="demo"
  document.getElementById("demo").innerHTML = days + "d " + hours + "h "
  + minutes + "m " + seconds + "s ";

  // If the count down is finished, write some text
  if (distance < 0) {
    document.getElementById("demo").innerHTML = "EXPIRED";
}, 1000);
Try it Yourself »