<html xmlns="http://www.w3.org/1999/xhtml">

  <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
    .fonts {
      border: 2px solid green;
      color: green;
  <script type="text/javascript">
    $(function() {

      //This setTimeout function execute or call automatically when 5 second completed.
      setTimeout(function() {
      }, 5000);

      $('#btnShow').click(function() {
        //This is used for show the div.

        //This setTimeout function execute when click on show div buton and hide automatically.
        setTimeout(function() {
        }, 5000);


    <input type="button" id="btnShow" value="Click for Show div" />

  <div class="fonts" id="divShow">
    <h2>Hi, Welcome you to code-sample.com.</h2> It will disappear in 5 seconds!

// Code goes here

/* Styles go here */