02. [20p] Hyper-linking multiple pages

Time to add a second HTML page:

  • As expected, copy + paste your initial HTML with a new name, e.g.: second.html;
  • Link together the two .html pages (in each HTML page, find the <a class=”…” href=”..”> links inside the #navbarToggle div and edit the hrefs to point to each-other);

Use relative paths, either pagename.html or ./pagename.html will do! DO NOT USE: absolute paths, e.g., C:\Users\…\pagename.html for obvious portability reasons!

  • Test by opening the HTML files in your browser. The user should be able to navigate between the two pages seamlessly!
  • One final touch: we want the menu to highlight (i.e., change foreground / background color and font style) the currently active menu button (different for each page)!

Hint: create a CSS class (e.g., .active) with your desired properties and append it to the appropiate menu link element: <a class=“nav-item nav-link” …> (also note: different class attribute values are separated by space!).

ii/labs/s2/02/tasks/02.txt · Last modified: 2024/03/17 18:24 by florin.stancu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0