This article focuses on some of the basics of using HTML col tags for centering chinese characters and col tags. There is also an example of the underlying use of the HTML Col tag. Now let's read this article together.
First we introduce the center of the Chinese character in the col tag in HTML:
Here's a align property: The Align property specifies the horizontal alignment of content related to the COL element.
Tell me about the property value of the Align property:
Grammar
<col align= "center" >
Center The Chinese characters in the middle of the display.
Look at an example of the use of the Align attribute in an HTML col tag:
<table width= "100%" border= "1" > <col align= "left" > <col align= "center" > <col Align = "Right" > <tr> <th>topic.alibabacloud.com</th> <th>HTML</th> <th>PHP</th> </tr> <tr> <td>100</td> <TD>HJSDHDF </td> <td>$135</td> </tr></table>
The effect is obvious, in the example above, the col element specifies a different alignment for the three columns in the table.
Now say the basic use of the col tag:
The <col> tag specifies the column properties of each column within the <colgroup> element.
By using the <col> tab, you can apply styles to an entire column without repeating the style for each cell or row.
Let's take a look at the usage examples of html<col> tags:
The <colgroup> and <col> labels set the background color for the three columns in the table:
<table border= "1" > <colgroup> <col span= "2" style= "background-color:red" > <col style= "Background-color:yellow" > </colgroup><tr> <th>topic.alibabacloud.com</ th> <th>HTML</th> <th>PHP</th> </tr> <tr> <td >100</td> <td>hjsdhdf</td> <td>$135</td> </tr></table >
This effect is obvious, such as
This figure and code combination, it should be easy to guess what to say, here is not much to say, want to know that you can go to more experimental experiments, so more familiar to remember.
This is the center of the HTML Col tag and the basic way to use. If you have questions, you can ask below.