how to link html file to another html file code example

Example 1: html links

<a href="url">link text</a>

Example 2: include another html file in a html file

<html> 
  <head> 
    <script src="jquery.js"></script> 
    <script> 
    $(function(){
      $("#includeContent").load("fileName.html"); 
    });
    </script> 
  </head> 

  <body> 
     <div id="includeContent"></div>
  </body> 
</html>

Example 3: a href to other site

<a href="https://examplesite.com" target="_blank" rel="noopener noreferrer">
  Example Link
</a>

Example 4: link to external site html

<a href="https://www.example.com">This is a link</a>

Tags:

Html Example