Table layout in HTML

Source: Internet
Author: User

<Tablewidth= "+"Height= " the"Border= "1"bgcolor= "Blue">        <caption>I'm the head of the table</caption>        <TR>            <th>Haha 1</th>            <th>Haha 2</th>            <th>Haha 3</th>        </TR>        <TR>                        <TDbgcolor= "Red">4</TD>            <TD>5</TD>            <TD>6</TD>        </TR>        <TR>                        <TDcolspan= "3">2</TD>            <!--<td>2</td> <td>3</td> -        </TR>    </Table>

I'm the head of the table
haha 1 haha 2 haha 3
4 5 6
2

Table can be directly set the width and height of the background color border length

The caption label is a table header and does not occupy table space.

The TR represents a row, th/td represents a cell, a cell can be set colspan= "x" Implementation spans multiple columns, and the rowspan implementation spans multiple rows and can also set the background color of this cell.

The text alignment in the table is achieved by setting the align= "left, right, center".

Previous contact with the front end is from the table learning, then feel very interesting, just a few lines of code can achieve a table function, now feel table too low, are too lazy to write.

Of course the table layout still has a certain disadvantage:

(1) The table layout consumes more bytes and affects the loading speed.

(2) Table layout is cumbersome and time-consuming, which is not conducive to design thinking, affecting the developer reading experience.

(3) Not conducive to browser order rendering.

Table layout in HTML

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.