HTML Table Advanced (table ADVANCED)

Source: Internet
Author: User
Tags border color

Color of the table

<------Background Color & Image------->

Background color and background image of the table element
<th bgcolor=#>
<th background= "URL" >

#=rrggbb 16 RGB Digital, or the following predefined color names:
Black, Olive, Teal, Red, Blue, maroon, navy, Gray, Lime,
Fuchsia, White, Green, Purple, Silver, yellow , Aqua .
<table border><tr><th bgcolor=ffaa00>food</th>    <th bgcolor=red>drink</th>    <th rowspan=2 background= "Image.gif" >sweet</th><tr bgcolor=white><td>a</td> <td>B</td></table>

Food Drink Sweet
A B

<------Border Color------->

Color of Table borders
<table bordercolor=#>

<table cellspacing=5 border=5 bodercolor= #ffaa00 ><tr><th>food</th><th>drink</th ><th>Sweet</th><tr><td>A</td><td>B</td><td>C</td>      </table>

Food Drink Sweet
A B C

<------Light & Dark Border Color------->

Table Border Color Brightness control
<table bordercolorlight=#>
<table bordercolordark=#>

<table cellspacing=5 border=5      bordercolorlight=white Bordercolordark=maroon><tr><th>food </th><th>Drink</th><th>Sweet</th><tr><td>A</td><td>B< /td><td>c</td>      </table>

Food Drink Sweet
A B C

<--################## Structured Table ########################-->

Group display of tables (structured table)

<------Groups of Rows------->

GROUP BY row
<thead> </thead>-Table headers (header)
<tbody> ... </tbody>-the body of the table
<tfoot> ... </tfoot>-table footnote (Footer)

<table border><thead>     <tr><th>Food</th><th>Drink</th><th> Sweet</th></thead><tbody>     <TR><TD>A</TD><TD>B</TD><TD >C</td>     <tr><td>d</td><td>e</td><td>f</td></tbody ></table>


Food Drink Sweet
A B C
D E F

<------Groups of Columns------->

Group BY column
<colgroup align=#> #=left, right, center

<table border Width=160><colgroup Align=left><colgroup align=center><colgroup align=right>     <thead>          <tr><th>Food</th><th>Drink</th><th>Sweet</th>     </thead>     <tbody>          <tr><td>a</td><td>b</td><td>c </td>          <tr><td>D</td><td>E</td><td>F</td>     </tbody ></table>


Food Drink Sweet
A B C
D E F

<------Groups of Columns------->

Property Control for columns
<col span=#> #= The number of columns in the column with the specified property, starting from the left
<col align=#> #=left, right, center

<table border width=160><colgroup>     <col align=center     span=2><colgroup <thead>          <tr><th>Food</th><th>Drink</th><th>Sweet</th>     </thead>     <tbody>          <tr><td>a</td><td>b</td><td>c</td >          <tr><td>D</td><td>E</td><td>F</td>     </tbody></ Table>

Food Drink Sweet
A B C
D E F

<--################## Frame ########################-->

The display of borders in a table

<------all------->

Show all 4 borders <table frame=box>

<table Border frame=box><thead>     <tr><th>Food</th><th>Drink</th> <th>Sweet</th></thead><tbody>     <tr><td>a</td><td>b</td ><td>C</td>     <tr><td>D</td><td>E</td><td>F</td> </tbody></table>

Food Drink Sweet
A B C
D E F

<------above------->

Show only top border <table frame=above>

Food Drink Sweet
A B C
D E F

<------below------->

Show only bottom Border <table frame=below>

Food Drink Sweet
A B C
D E F

<------hsides------->

Show only top and bottom borders <table frame=hsides>

Food Drink Sweet
A B C
D E F

<------vsides------->

Show only left and right border <table frame=vsides>

Food Drink Sweet
A B C
D E F

<------LHS------->

Show only left border <table frame=lhs>

Food Drink Sweet
A B C
D E F

<------RHS------->

Show only right border <table frame=rhs>

Food Drink Sweet
A B C
D E F

<------void------->

Do not show any borders <table frame=void>

Food Drink Sweet
A B C
D E F

<--################## Rule ########################-->

Display of divider lines (Rules) in a table

<------all------->

Show all separator lines <table rules=all>

<table border Rules=all><colgroup><col align=center span=2><colgroup align=right>     < thead>          <tr><th>Food</th><th>Drink</th><th>Sweet</th>     < /thead>     <tbody>          <tr><td>A</td><td>B</td><td>C</td>          <tr><td>D</td><td>E</td><td>F</td>     </tbody>     < tbody>          <tr><td rowspan=3 align=right>total $-00.0</td>     </tbody></table>

Food Drink Sweet
A B C
D E F
Total $-00.0

<------groups------->

Displays only the divider line between the group (Groups) and the group <table rules=groups>

Food Drink Sweet
A B C
D E F
Total $-00.0

<------rows------->

Display only the divider line between rows and rows <table rules=rows>

Food Drink Sweet
A B C
D E F
Total $-00.0

<------cols------->

Show only the divider line between columns and columns <table rules=cols>

Food Drink Sweet
A B C
D E F
Total $-00.0

<------none------->

Do not show any divider <table rules=none>

Food Drink Sweet
A B C
D E F
Total $-00.0



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.