function to redirect to a different webpage in same html site code example
Example 1: how to redirect a page to another url in html
<meta http-equiv="Refresh" content="0; url=https://www.w3docs.com" />
Example 2: html redirect to another page
<script>
function foo() {
window.location.href = url
}
</script>