Tabs is a web design started in ≈1999. For screenshots of popular sites using tab design, see: Web Design: Survey of Tab Style 2006.
Here's the basics.
On this page we use table tag. Here's the tab HTML code:
<table border="1"> <tr> <td id="a" class="tab">Tab A</td> <td id="b" class="tab">Tab B</td> <td id="c" class="tab">Tab C</td> </tr> </table> <script src="tab.js"></script>
When a tab is clicked, there are few things that must be done:
Here's the js code:
In bottom few lines, we set the table cell tags to have a action. When clicked, it will open the page associated with that tab.
Then, “setTabColor” is called. It first get the file path, parse it to get the file name without the extension. Then, use that as id to set the correct tab's color.Disqus