Home  >  Article  >  Web Front-end  >  How to use rowspan attribute

How to use rowspan attribute

不言
不言Original
2019-02-11 14:40:4317413browse

The rowspan attribute in HTML specifies the number of rows a cell should span. That is, if a row spans two rows, it means it will take up the space of two rows in the table. It allows a single table cell to span the height of multiple cells or rows. The rowspan attribute has the same function as the spreadsheet's "merged cells" in Excel.

How to use rowspan attribute

rowspan attributeCan be used with the and elements in HTML tables.

The rowspan attribute When used with the

tag, the rowspan attribute determines the standard number of cells it should span.

When the rowspan attribute is used with the

tag, the rowspan attribute determines the number of header cells it should span.

Let’s look at a specific example

Used with the tag

The code is as follows

  
  
      
        HTML rowspan  
         
    
Name Age
Tom 24
Marry

The effect is as follows

How to use rowspan attribute

##When used with the

tagThe code is as follows

  
  
      
        HTML rowspan  
         
    
Name Age php中文网
Tom 24
Marry 25

The effect is as follows


How to use rowspan attribute

This article ends here. For more front-end exciting content, you can pay attention to the relevant column tutorials on the PHP Chinese website! ! !


The above is the detailed content of How to use rowspan attribute. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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