" or ""."> How to set the horizontal span of cells in html5-HTML Tutorial-php.cn

How to set the horizontal span of cells in html5

青灯夜游
Release: 2021-12-17 16:38:48
Original
2580 people have browsed it

In HTML5, you can use the colspan attribute of the cell element (td or th) to set the horizontal span of the cell. This attribute can define the number of columns that the cell should span. The syntax "

" or "".

How to set the horizontal span of cells in html5

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

In HTML5, if you want to set the horizontal span of a cell, you can use the colspan attribute.(colspan attribute acts on td or th elements)

The colspan attribute is used to define the number of columns that the cell should span.

Syntax:

 
Copy after login
Value Description
number

specifies the number of columns the cell should span.

Comment:colspan="0"Tells the browser to make the cell span to the last column of the column group (colgroup).

Example:

    设置单元格列跨度 
存款(1~3月)
一月 3000 元
二月 5000 元
三月 3500 元
总计:11500 元
Copy after login

How to set the horizontal span of cells in html5

Related recommendations: "html video tutorial"

The above is the detailed content of How to set the horizontal span of cells in html5. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!