html go to another page code example

Example 1: html redirect

<!DOCTYPE html>
      <title>HTML Meta Tag</title>
      <meta http-equiv = "refresh" content = "2; url =" />
      <p>Hello HTML5!</p>

Example 2: a href to other site

<a href="" target="_blank" rel="noopener noreferrer">
  Example Link

Example 3: linking external pages html

<a href="">Visit our HTML tutorial</a>

Example 4: html redirect to another page

  function foo() {
  	window.location.href = url


Html Example