HTML table tag tutorial (35): cross-column attribute COLSPAN

HTML table tag tutorial (35): cross-column attribute COLSPAN

In a complex table structure, some cells span multiple cells vertically, which requires the use of the cross-column attribute COLSPAN.
Basic syntax
<TD COLSPAN=VALUE>
Syntax
VALUE represents the number of columns the cell spans.
File example: 10-33.htm
The COLSPAN attribute is used to implement cells that span columns.
01 <!-- ------------------------------ -->
02 <!-- File example: 10-33.htm -->
03 <!-- File Description: Set up a table spanning columns -->
04 <!-- ------------------------------ -->
05 <HTML>
06 <HEAD>
07 <TITLE>Setting a table spanning columns</TITLE>
08 </HEAD>
09 <BODY>
10 <TABLE BORDER=3 WIDTH=400 HEIGHT=100 Bordercolor=#336699 ALIGN="CENTER">
11 <TR>
12 <TD ColSpan=2 Align="Center">Web page creation software</TD>
13 </TR>
14 <TR>
15 <TD>Web Graphics Software</TD><TD>Fireworks</TD>
16 </TR>
17 <TR>
18 <TD>Web page creation software</TD><TD>Dreamweaver</TD>
19 </TR>
20 <TR>
21 <TD>Web animation software</TD><TD>Flash</TD>
22 </TR>
23 </TABLE>
24 </BODY>
25 </HTML>
File description <br />The first cell in row 12 spans two columns.

<<:  Vue3 (Part 2) Integrating Ant Design Vue

>>:  Vue3 (III) Website Homepage Layout Development

Recommend

Getting Started: A brief introduction to HTML's basic tags and attributes

HTML is made up of tags and attributes, which are...

Detailed explanation of vite2.0+vue3 mobile project

1. Technical points involved vite version vue3 ts...

HTML code that can make IE freeze

We simply need to open any text editor, copy the f...

Solution to the ineffective margin of div nested in HTML

Here's a solution to the problem where margin...

JS implements simple addition and subtraction of shopping cart effects

This article example shares the specific code of ...

Cross-domain issues in front-end and back-end separation of Vue+SpringBoot

In the front-end and back-end separation developm...

How to use union all in MySQL to get the union sort

Sometimes in a project, due to some irreversible ...

How to detect whether a file is damaged using Apache Tika

Apache Tika is a library for file type detection ...

The latest MySQL 5.7.23 installation and configuration graphic tutorial

The detailed installation and configuration of th...

VMWare Linux MySQL 5.7.13 installation and configuration tutorial

This article shares with you the tutorial of inst...

How to add Tomcat Server configuration to Eclipse

1. Window -> preferences to open the eclipse p...

Perfect solution for vertical centering of form elements

Copy code The code is as follows: <!DOCTYPE ht...

How to install kibana tokenizer inside docker container

step: 1. Create a new docker-compose.yml file in ...

Navicat connects to MySQL8.0.11 and an error 2059 occurs

mistake The following error occurs when connectin...