colspan and rowspan of HTML form elements

Source: Internet
Author: User
Tags ranges

colspanAnd rowspan These two properties are used to create special tables.

colspanThe number of columns used to specify the horizontal span of the cell: colspan is the merge column, and the colspan=2 is to merge two columns.

rowspan用来Specify the number of rows that the cell spans vertically: rowspan is used to merge rows, for example, rowspan=2 is merging two rows,

    • RowSpan are commonly used in TD and th tags
    • Row: Rows, span: Spans, spans, ranges
    • Col: columns, span: Spans, spans, ranges
<Body><TableBorder= "1"width= "+">    <TR>        <TD>1</TD>        <TD>2</TD>        <TD>3</TD>    </TR>    <TR>        <TD>4</TD>        <TD>5</TD>        <TD>6</TD>    </TR></Table></BR><TableBorder= "1"width= "+">    <TR>        <TDcolspan=3>Merge the three columns of the first row</TD>    </TR>    <TR>        <TD>4</TD>        <TD>5</TD>        <TD>6</TD>    </TR></Table></BR><TableBorder= "1"width= "+">    <TR>        <TDrowspan= "2">Merge two rows of the first column</TD>        <TD>2</TD>        <TD>3</TD>    </TR>    <TR>        <TD>5</TD>        <TD>6</TD>    </TR></Table></Body>


The following will be displayed in the browser

colspan and rowspan of HTML form elements

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.