HTML tutorial-Multiple-row, multiple-column table elements

Source: Internet
Author: User
Tutorial to create a TABLE element that spans multiple rows and columns, you simply add the rowspan or colspan attribute in <TH> or <TD>, which indicates the number of rows or columns to span in the table element.

Table elements across multiple columns <th colspan=#> <td colspan=#>
colspan represents the number of columns spanned, such as colspan=2, which represents the width of two columns for this lattice.

Table elements across multiple lines <th rowspan=#> <td rowspan=#>
The meaning to be represented by RowSpan is the number of rows spanned, for example, rowspan=2 represents the height of the grid across table two rows.

 
  

A TABLE element that spans multiple columns

<title> form table</title>

<table border><tr><th colspan=3> on duty </th><tr><th> Monday </th>       <th > Tuesday </th>  <th> Wednesday </th><tr><td> li he </td><td> Zhang </td><td > Wang Ping </td></table>

a TABLE element that spans multiple lines

<title> form table</title>

<table border><tr><th rowspan=2> on duty </th><th> Monday </th><th> Tuesday </th >  <th> Wednesday </th></tr><tr><td> Qiang </td><td> Zhang Ming </td><td> Wang Ping </td></tr></table>


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.