User:Wonghk3/Sandbox/WikiTextA2

CH-7: TABLES-PLACEMENT
FOLLOW samples on tutorial page... Tables-Placement

Using the BORDER ATTRIBUTE in a TABLE
We've learned how to create a simple table with borders using the class="wikitable" code, but what if we want to customize our own table? To effect customization, we add INLINE styling along with the BORDER attribute. TO DEMO: 1. CREATE a basic table without borders, then show preview

2. ADD INLINE STYLING to the OPENING TABLE TAG and the BORDER ATTRIBUTE: {| style="border:1px solid red"

3. RESULTS: an outer box encircles the table 4. ADD the BORDER ATTRIBUTE to EACH CELL: | style="border:1px solid red"|apples

5. RESULTS: inner boxes surround each cell value

CH-8: TABLES-SORTING
FOLLOW samples on tutorial page... Tables-Sorting

TABLE WIDTH
 * Using the sample from the previous lesson, note the width of each cell is normally controlled by the largest word in a table's column.
 * We can control the table width using the WIDTH attribute: Property=Width + Value=px or percent
 * Preferred method is to use percent

1. ADD the width attribute to the opening table tag, then show preview {| style="border:1px solid red ; width:100%" 2. RESULTS: all columns are of equal width across the width of the whole page

CELL and COLUMN WIDTH
 * Recall: width of cells are controlled by the text in each cell unless we apply the width attribute for the whole table
 * To control column width, install the width attribute to the cells of the first row
 * width% of each cell must sum to 100%

3. REMOVE width from table tag line 4. ADD the width attribute to each cell of the first row ONLY, then show preview | style="border:1px solid red ; width:25%"|Apples (thru Wheat)

5. RESULTS: all rows below first row is affected similarly; meaning, all columns are of equal width within the table; note: table itself does not extend across the page

6. COMBINE width in both table tag (70%) and cell tag (as is), then show preview 7. RESULTS: Note columns are equally spaced and table extends to 70% of page width

CH-9: TABLES-SCROLLING
FOLLOW samples on tutorial page... Tables-Scrolling

CH-10: TABLES-COL ONLY
FOLLOW samples on tutorial page... Tables-Columns Only

CH-11: TABLES-COL SPANS
FOLLOW samples on tutorial page... Tables-Column Spans

CH-12: TABLES-ROW SPANS
FOLLOW samples on tutorial page... Tables-Row Spans