Table, TableHeader, TableRow, TableData object,

Source: Internet
Author: User

Table, TableHeader, TableRow, TableData object,
Change the Border width of a table

Source code

<!DOCTYPE html>

 

Running result

Change the cellpadding and cellspacing of a table.

Source code

<!DOCTYPE html>

 

Running result

Frame of the specified table

Source code

<!DOCTYPE html>

 

Running result

Specify rules for a table

Source code

<!DOCTYPE html>

 

Running result

InnerHTML of a row

Source code

<!DOCTYPE html>

 

Running result

InnerHTML of a cell

Source code

<!DOCTYPE html>

 

Running result

Create a title for the table

Source code

<!DOCTYPE html>

 

Running result

Delete rows in a table

Source code

<!DOCTYPE html>

 

Running result

Add rows in the table

Source code

<!DOCTYPE html>

 

Running result

Add cells in a table row

Source code

<!DOCTYPE html>

 

Running result

Cell content Horizontal Alignment

Source code

<!DOCTYPE html>

 

Running result

Cell content Vertical Alignment

Source code

<!DOCTYPE html>

 

Running result

Horizontal alignment of the content of a single cell

Source code

<!DOCTYPE html>

 

Running result

Vertical Alignment of the content of a single cell

Source code

<! DOCTYPE html> 

 

Running result

Change the cell content

Source code

<!DOCTYPE html>

 

Running result

Change row content

Source code

<! DOCTYPE html>

<Html>

<Head>

<Script>

Function setColSpan ()

{

Var x = document. getElementById ('mytable'). rows [0]. cells;

X [0]. colSpan = "2 ";

X [1]. colSpan = "6 ";

}

</Script>

</Head>

 

<Body>

<Table id = "myTable" border = "1">

<Tr>

<Td colspan = "4"> cell 1 </td>

<Td colspan = "4"> cell 2 </td>

</Tr>

<Tr>

<Td> cell 3 </td>

<Td> cell 4 </td>

<Td> cell 5 </td>

<Td> cell 6 </td>

<Td> cell 7 </td>

<Td> cell 8 </td>

<Td> cell 9 </td>

<Td> cell 10 </td>

</Tr>

</Table>

<Form>

<Input type = "button" onclick = "setColSpan ()" value = "Change colspan">

</Form>

</Body>

 

</Html>

Running result


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.