Below is shown a small part of a web page. Specify the HTML code to generate this.

Note 1: No graphics (<IMG> tags) are used.

Note 2: The distance between "Go to:" and "All forums" is slightly larger than the distance between row 2 and 3. But I will give 5 points for an otherwise correct answer, even for those who cannot propose how to achieve this without user of an <IMG> tag.


Solution 1:

There are of course many ways to achieve this. Below is one solution. All this was not required for full score on the exam. The actual web page from which the example was taken used style sheets, but the solution below does not use style sheets.

<table border="0" cellspacing="0" cellpadding="5">
  <tr valign="top">
    <td bgcolor="#003333" width="150">
      <font color="#CCCC99" size="2" face="Verdana"><b>Go to:</b></font><br> 
      <a href="foo.bar/allforums" 
      <font color="#CCCC99" size="2" face="Verdana"          
      All forums</b></font></a>
      <font face="Verdana" size=4><b>&nbsp;</b></font><br>           
      <a href="foo.bar/Work">           
      <font color="#CCCC99" size="2" face="Verdana"          
      <a href="foo.bar/bugsinkom2000">           
      <font color="#FFCCCC" size="2"          
      face="Verdana" style="text-decoration:none"><b>           
      &nbsp;&nbsp;&nbsp;&nbsp;Bugs in KOM 2000</b></font></a>

A very different solutions would be to split the table into many cells to achieve the desired look.


<td bgcolor="#003333" width="150"> will produce a table cell, filled with a dark colour.

<font face="Verdana" size=4><b>&nbsp;</b></font> will introduce one large (non-visibile) character on the second line, causing the line difference before this line to be slightly increased.

Since this is obviously a command bar, <a href=... was added for the commands.

style="text-decoriation:none" will inhibit the normal underscoring of links made by most web browsers.


Solution 2:

This solution uses a multi-cell construct instead:

<table border="0" cellspacing="0" cellpadding="0" width="150">
    <td bgcolor="#003333" height=20 colspan="3" valign=middle>
      <font color="#CCCC99" size="2" face="Verdana"><b>
        Go to:</b></font></td>
    <td bgcolor="#003333" colspan="3" valign=top>
      <a href="foo.bar/allforums">
      <font color="#CCCC99" size="2" face="Verdana"
      All forums</b></font></a></td>
    <td bgcolor="#003333" width="10">&nbsp;</td>
    <td bgcolor="#003333" colspan="2" valign=top>
      <a href="foo.bar/Work">
      <font color="#CCCC99" size="2" face="Verdana"
     <td bgcolor="#003333"height="30">&nbsp;</td>
     <td bgcolor="#003333" width="10" height="30">&nbsp;</td>
     <td bgcolor="#003333" height="30" valign=top>
       <a href="foo.bar/bugsinkom2000">
       <font color="#FFCCCC" size="2" face="Verdana"
       Bugs in KOM 2000</b></font></a></td>


1 Dark background
1 Light text
1 Limited width
1 Clickable links
1 No underscoring of links
1 Indentation
1 Increased line distance after "Go to:"
6 Max score

List of exam questions