| Table Headings and Heights of Table Rows |
|
1-14 A 1 Discover In the Exercises01 folder, create an HTML file with these lines of code: <html> <body> <table style="border-width:5px;border-style:solid;border-color:blue;"> <tr> <td colspan=3 style="border-width:4px; border-style:solid;border-color:red;">R1.</td> </tr> <tr> <tr> Open this file in a browser and explain this attribute: colspan=3 |
|
1-14 Explanation 1: The colspan attribute of the table data tag pair To extend content over several columns, set the colspan attribute of the table data tag pair to the number of columns you want it to span:<td colspan="property value"></td> |
|
1-14 Example 1: The colspan attribute of the table data tag pair In this table, the first row extends over the first column only:
To extend the first row over two columns, set the colspan attribute of the table data tag pair to 2:
|
|||||||||||
|
1-14 A 2
The colspan attribute of the table data tag pair In the Exercises01 folder, create an HTML file that displays this table:
|
||||||||||||
|
1-14 A 3
The text-align property of the table data tag In the Exercises01 folder, create an HTML file that displays this table:
|
||||
|
1-14 A 4
Text centered In the Exercises01 folder, create an HTML file that displays this table:
|
||||||||
|
1-14 Explanation 2: The text-align property of the table data tag The text-align property of the table data tag pair can be set to left, center and right. This style can be applied to the table data tag, together with the colspan attribute. If it is not set, then the alignment will default to left. |
|
1-14 A 5 Discover In the Exercises01 folder, create an HTML file with these lines of code: <html> <body> <table > <tr style="height:100px;" > <td style="border-width:4px; border-style:solid;border-color:red;height:100px;">R1C1.</td> </tr> </table> </body> </html> Open this file in a browser and explain this style: height:100px; |
|
1-14 Explanation 3: The height of a table row The height style can be used to set the height of a table row: <tr style="height:value in px;" > |
|
1-14 A 6
In the Exercises01 folder, create an HTML file that displays the table below. The height of its middle row is set to 50px.
|
|
1-14 A 7 Rereading the yellow sections
Now that you have gone through the exercises on this page, reread the yellow sections. |
1-14 A 8
StarfruitJuice14.html
Use coral as the background color for the table row with the Starfruit Juice Recipe title. |
|
This page was created by Hanspeter Amend
|
|
|
Solution proposals 1-14 A 2 <html> <table style="border-width:5px;border-style:solid;border-color:blue;"> <tr> <tr> <tr> </body> 1-14 A 3 <table style="border-width:5px;border-style:solid;border-color:blue;"> <tr> <td colspan=2 style="border-width:4px; border-style:solid;border-color:red;text-align:center;">R1.</td> </tr> <tr> 1-14 A 4 <table style="border:5px;border-style:solid;border-color:blue;"> <tr> <td colspan=2 style="border:4px; border-style:solid;border-color:red;text-align:center;">R1.</td> </tr> <tr> <td style="border:4px; border-style:solid;border-color:red;">R2C1</td> <td style="border:4px; border-style:solid;border-color:red;">R2C2</td> </tr> <tr> <tr> 1-14 A 6 <html> <table style="border-width:5px;border-style:solid;border-color:blue;"> <tr
style="height:50px;"> <tr> </body> 1-14 A 8 <html> <!- - Set style attribute for the color style of the page background.
- -> <!- - Title: Set style attribute for text style. - -> <!- - Line break - -> <!- - Paragraph - -> <!- - Three row table. Set style attribute
for position style and table size style. - -> <tr> <!- - Placing the unordered list into the second row and left column
of the table. - -> <!- - Set style attribute for font styles. - -> <!- - Set style attribute for list style and font styles. - -> <!- - Placing heading, title and unordered list into the third
row and first column of the table. - -> <!- - Ordered list. Set style attributes for font styles and for spacing
style between list items.- -> font-family:'Times New Roman';font-size:200%;font-weight:bold; font-style:italic;text-decoration:underline;">Preparation
of Starfruit Juice</span> <!- - Ordered list. Set style attributes for font style and for
spacing between list items style.- -> </html> |
|