I have some ten html pages each page also has same header and footer tag can i have one page with complete header and footer ,and i will refer to that particular page from other html pages.
You do this by using a server side language like PHP or another one of the myriad different languages out there, which pre-processes the page. Something along these lines:
<?php include 'header.html'; ?>
... page contents...
<?php include 'footer.html'; ?>
What's your server side scripting language? You can do what is called an "include."
The exact syntax depends on the language(s) your web server supports.
Presuming the "master-pages" tag on the question refers to ASP.NET, here's a Super Link. Ps. You should give Ruby on Rails a try as well :)
If you don't care about users who have JavaScript disabled, or are using some mobile platforms, you can use JavaScript to do it.
headerfooter.js
window.onload = function ()
{
var header = document.getElementById('header');
var footer = document.getElementByID('footer');
header.innerHTML = "<h1>My website</h1><h2>Rules</h2>";
footer.innerHTML = "<small>This code is in the public domain</small>";
}
page.html
<html>
<head>
<script type="text/javascript" src="headerfooter.js"></script>
</head>
<body>
<div id="header"></div>
... Your content ...
<div id="footer"></div>
</body>
</html>
But don't do this, it's user unfriendly, and unprofessional. Just stick with either using php, or building a solid template which doesn't need to be edited much later.