HTML/XHTML:Tables(DIV/XML)

From virtualMV2015wiki
Jump to: navigation, search
 Home  HTML/XHTML <

Objectives

To show how Tables should be created using XML and CSS


Scrolling tables

The division tag (div) can be used to create scrolling tables in a web page. example. 1. Create a table of headings 2. add

<div style="height:150px; overflow: auto;">

3. Create a second table with the data

4. add

</div>

to end the division For example

<table><tr><th>Code</th><th>Country</th></tr></table>
<div style="height:100px; width:50%; overflow: auto;">
<table>
<tr><td>au</td><td>Australia</td></tr>
...
<tr><td>nz</td><td>New Zealand</td></tr>
...
</table>
</div>


CodeCountry
auAustralia
cnChina
jpJapan
nzNew Zealand
zaSouth Africa
twTaiwan

If you want both vertical and horizontal scroll bars use overflow: scroll;

Icon References.png References


HTML/XHTML:Tables(DIV/XML). (2017). In virtualMV's ( Michael Verhaart ) wiki. Retrieved December 18, 2017, from http://www.virtualmv.com/wiki/index.php?title=HTML/XHTML%3ATables(DIV/XML)    (zotero)