<title>Common Wombat</title>
</head>
<body>
<h1>Common Wombat</h1>
<p><img src="King_Island_wombats.jpg">
The <b class="english-definition">common wombat</b>
(<i class="latin-taxonomy">Vombatus ursinus</i>), also called
<b class="english-definition">bare-nosed wombat</b> or
<b class="english-definition">coarse-haired wombat</b>, is
one of three living wombat species. The common wombat reaches
an average of 98 cm in length and a weight of 26 kg. It
prevails in colder and wetter parts of South East Australia.
The common wombat was first described by George Shaw in 1800.
</p>
<p>
There exist three subspecies of the common wombat:
</p>
<ul>
<li><i class="latin-taxonomy">V. ursinus hirsutus</i>
on the Australian Mainland.</li>
<li><i class="latin-taxonomy">V. ursinus tasmaniensis</i>
in Tasmania.</li>
<li><i class="latin-taxonomy">V. ursinus ursinus</i>
on Flinders Island to the north of Tasmania.</li>
</ul>
</body>
</html>
Note that text will not wrap aroun d the picture because, as I already pointed out, this
cannot be done using only HTML.
2.2 Lists and Ta bles
Professor: I’m glad that yo u succeeded in finding and using unordered list on y our
own. Still, I would like to point out some th ings about elements <ul> (unorder ed list)
and <ol> (ordered list). Basically, they are the same, only the first one is u sed when
the or der in whic h the items are listed is completely irrelevant, while the second one is
used when the order is important. The items in an unordered list are usually preceded
18 Meeting 2. Building a Sound Structure
by bullets while in an o rdered list they come with ordinal numbers or letters. The use
of lists is quite straightforward. Ther es one th ing, however, you ne ed to be careful
about.
If you look at element descriptions in the reference at the end of this book, you will
notice that the elements <ul> and <ol> alike can only contain <li> (list item) ele-
ments and nothing else. Since a list is composed of items, this is hardly a surprise.
Still, many people find themselves completely at a loss for where to put sublists. As
we alr eady discussed, browsers are quite tolerant o f bad HTML c ode and you won’t
know whether yo u did it right unle ss you use a validator. So, let me ask you a ques-
tion. Where do you think one sh ould put a sublist? Or, more specifically, could you
write HTML code for the following list?
Maria: Let m e th ink. A <ul> element can only contain <li> elements. That means
that I cannot put another list inside a list. On the other h and, a sublist should be a part
of a list. Now, the only possibility I see is to put a su blist inside an <li> element. Am
I right? Like this:
<ul>
<li>New South Wales
<ul>
<li>Birrahgnooloo</li>
<li>Dirawong</li>
<li>Wurrunna</li>
</ul>
</li>
<li>Queensland
<ul>
<li>Dhakhan</li>
<li>I’wai</li>
<li>Yalungur</li>
</ul>
</li>
</ul>
Professor: Perfect! When you think of it, a sublist in fact always re la te s to a specific
list item rather tha n a list as a whole. I t is therefore the only logical solution to put a
2.2. L ists and Tables 19
sublist in sid e a list item.
Lists allow authors to organize document data in a specific way. Another such element
is <table>. Just like lists, the <table> elem ent also has its conte nt limited to a
small number of allowed direct descendants. Amongst them you’ll find an optio nal
<caption> element and a n obligatory <tr> element. Each <tr> (table row) element
represents a row in a table and its only dir ect descendants can be <td> (table data )
and < th> (table header) elements. The former represent table data cells and the latter
table hea der cells. You can stretch any data or head er cell over more rows or c olumns
using their rowspan and c olspan attributes, respectively. The <caption> elemen t
holds th e table captio n and should appear before any <tr> elements.
Here’s a comp licated example:
<table border="1">
<tr>
<td rowspan="3"></td>
<th colspan="4">Imports</th><th colspan="4">Exports</th>
</tr>
<tr>
<th>Value</th><th colspan="3">Annual change (%)</th>
<th>Value</th><th colspan="3">Annual change (%)</th>
</tr>
<tr>
<th>2010</th><th>2008</th><th>2009</th><th>2010</th>
<th>2010</th><th>2008</th><th>2009</th><th>2010</th>
</tr>
<tr>
<td>Mozambique</td>
<td>1,200</td><td>10.6</td><td>-2.5</td><td>19.0</td>
<td>2,600</td><td>5.1</td><td>1.5</td><td>25.4</td>
</tr>
<tr>
<td>Kyrgyz Republic</td>
<td>300</td><td>1.9</td><td>0.5</td><td>6.7</td>
<td>500</td><td>2.1</td><td>-1.5</td><td>2.9</td>
</tr>
</table>
And th e result in the browser.
20 Meeting 2. Building a Sound Structure
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.11.247