How to center the Chinese characters in the col tag in HTML? Basic use of HTML col tags (with examples in it)

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.