跳至内容

BTEC IT 第 20 单元 - 网站设计/HTML/导航

摘自维基教科书,开放的世界开放书籍

简单导航栏(使用表格)

<table width="100%">
  <tbody>
    <tr>
      <td><strong><a href="home.html">Home</a></strong></td>
      <td><strong><a href="animals.html">Animals</a></strong></td>
      <td><strong><a href="exhibitions.html">Exhibitions</a></strong></td>
    </tr>
  </tbody>
</table>

导航栏(使用列表)

 <head> <style>
.one {
background-color:#5CAF50; /* change colour using hex*/
}

.two {
background-color:#6CAF50; /* change colour using hex*/
}

.three {
background-color:#7CAF50; /* change colour using hex*/
}

.four {
background-color:#8CAF50; /* change colour using hex*/
}

.five {
background-color:#9CAF50; /* change colour using hex*/
}

 <body>
<ul>
   <li><a class="one" href="home.html"> Home </a> </li> 
   <li><a class="two" href="aboutus.html">About Us</a>  </li> 
   <li><a class="three" href="info.html">Information</a>  </li> 
   <li> <a class="four" href="gallery.html">Gallery </a>  </li> 
   <li> <a class="five" href="contactus.html">Contact us </a> </li> 
</ul>
华夏公益教科书