Detailed explanation of HTML table inline format

Detailed explanation of HTML table inline format

Inline format

<colgroup>...</colgroup>

Attribute Name Attribute Value Description

align left
center
right
valign top
middle
bottom
span number inline number

bgcolor color background color

Individual inline settings

Format: <col> has the same function as <colgroup>

<!--Note that setting the DOCTYPE of the first line to xhtml will cause colgroup to fail-->

XML/HTML CodeCopy content to clipboard
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >   
  2.   
  3. < html   xmlns = "http://www.w3.org/1999/xhtml" >   
  4. < head >   
  5.      < title > Table inline format </ title >   
  6. </ head >   
  7. < body >   
  8.      < table   cellpadding = "5px"   cellspacing = "0px"   border = "1px"   bordercolor = "black" >   
  9. <!--Description: Use two sets of colgroup tags to control the entire third column to display in red
  10. The span = "2" in the first colgroup is equivalent to a placeholder, so the third column (the entire math column) will be displayed in red.
  11. Similarly, if you set span = "3" , the fourth column (the entire English column) will be displayed in red.
  12.              < colgroup   span = "2" > </ colgroup >   
  13.              < colgroup   bgcolor = "red" > </ colgroup >   
  14. -- >   
  15. <!-- < col > has the same functionality as < colgroup >
  16. Set the <col> tag to achieve the same function as <colgroup>
  17. Here, we add align = "right" to set the third column (the entire math column) to be right-aligned.
  18. -- >   
  19.          < col   span = "2"   />   
  20.          < col   bgcolor = "red"   align = "right"   />   
  21.          < caption   align = "left" > Student score sheet </ caption >   
  22.          < tr >   
  23.              < th > Name </ th >   
  24.              < th > Chinese </ th >   
  25.              < th > Mathematics </ th >   
  26.              < th > English </ th >   
  27.          </ tr >   
  28.          < tr >   
  29.              < td > Zhang San </ td >   
  30.              < td > 90 </ td >   
  31.              < td > 89 </ td >   
  32.              < td > 99 </ td >   
  33.          </ tr >   
  34.          < tr >   
  35.              < td > Li Si </ td >   
  36.              < td > 98 </ td >   
  37.              < td > 92 </ td >   
  38.              < td > 96 </ td >   
  39.          </ tr >   
  40.          < tr >   
  41.              < td > Wang Wu </ td >   
  42.              < td > 92 </ td >   
  43.              < td > 97 </ td >   
  44.              < td > 91 </ td >   
  45.          </ tr >   
  46.          < tr >   
  47.              < td > Total score </ td >   
  48.              < td > 200 </ td >   
  49.              < td > 200 </ td >   
  50.              < td > 200 </ td >   
  51.          </ tr >   
  52.      </ table >   
  53. </ body >   
  54. </ html >   

The above is all the content of the detailed explanation of HTML table inline format brought to you by the editor. I hope it will be helpful to you. Please support 123WORDPRESS.COM~

<<:  Complete steps to install MySQL 5.5 on CentOS

>>:  Docker Consul Overview and Cluster Environment Construction Steps (Graphical Explanation)

Recommend

CSS3 transition to achieve underline example code

This article introduces the sample code of CSS3 t...

VMware ESXI server virtualization cluster

Table of contents summary Environment and tool pr...

Examples of correct judgment methods for data types in JS

Table of contents Preface Can typeof correctly de...

How to encapsulate axios in Vue

Table of contents 1. Installation 1. Introduction...

What are the benefits of using B+ tree as index structure in MySQL?

Preface In MySQL, both Innodb and MyIsam use B+ t...

Install Apache2.4+PHP7.0+MySQL5.7.16 on macOS Sierra

Although Mac systems come with PHP and Apache, so...

How to design MySQL statistical data tables

Table of contents Is real-time update required? M...

Docker container monitoring and log management implementation process analysis

When the scale of Docker deployment becomes large...

Docker image optimization (from 1.16GB to 22.4MB)

Table of contents The first step of optimization:...

Detailed discussion on the issue of mysqldump data export

1. An error (1064) is reported when using mysqldu...

Detailed explanation of the execution principle of MySQL kill command

Table of contents Kill instruction execution prin...

Detailed analysis of the blocking problem of js and css

Table of contents DOMContentLoaded and load What ...

Delegating Privileges in Linux Using Sudo

Introduction to sudo authority delegation su swit...

MySQL 5.7.19 winx64 free installation version configuration tutorial

mysql-5.7.19-winx64 installation-free version con...