Hi,

I've started trying to work with Bootstrap, and I am now using a ready template for a website.
The default template has a nav-bar with class="active" on the "Home" button.

I have a few questions: Do I need to copy the code between <nav></nav> to each new page I create, i.e for Contact, for About, and so on? Or I should only copy the <nav></nav> content to a new file and save it as .html and then include it at the top of the body everytime? Or there is a completely different way?

Another thing: How can I make the class="active" always change to the current page I am? I think it should be done with JQuery or JavaScript, but my code won't work since I'm just beginning and learning.

If needed, here is the code for the navbar:

HTML Code:
<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#"><img id="logo" src="logo.jpg"></a>
    </div>
    <div class="collapse navbar-collapse" id="myNavbar">
      <ul class="nav navbar-nav">
        <li class="active"><a href="home.php">Home</a></li>
        <li><a href="about.php">About</a></li>
        <li><a href="projects.php">Projects</a></li>
        <li><a a href="contact.php">Contact</a></li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li id="login"><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
      </ul>
  
  </div>
  </div>
</nav>