How to center the Chinese characters in the col tag in html? Basic use of html col tag (examples included)

寻∝梦
Release: 2018-09-01 16:38:49
Original
5884 people have browsed it

本篇文章主要的讲解了关于html col标签的汉字居中和col标签的一些基础的使用方法。还有html col标签的基础使用实例。现在让我们一起阅读这篇文章吧

首先我们先介绍HTML中的col标签的汉字居中:

在这里介绍个align属性:align属性规定与col元素相关的内容的水平对齐方式。

说说align属性的属性值:

How to center the Chinese characters in the col tag in html? Basic use of html col tag (examples included)

语法

Copy after login

使其中的汉字居中显示出来。

看一个html col标签中align属性的使用实例:

PHP中文网 HTML PHP
100 hjsdhdf $135
Copy after login

效果很明显,在上面的例子中,col元素为表格中的三个列规定了不同的对齐方式。

现在来说说col标签的基本使用:

标签规定了元素内部的每一列的列属性。

通过使用标签,可以向整个列应用样式,而不需要重复为每个单元格或每一行设置样式。

再来看个关于HTML标签的使用实例:

和标签为表格中的三个列设置了背景色:

PHP中文网 HTML PHP
100 hjsdhdf $135
Copy after login

这个效果很明显,如下图

How to center the Chinese characters in the col tag in html? Basic use of html col tag (examples included)

这图和代码相结合,应该很容易猜到要说的是什么,这里就不多说了,想要知道可以自己去多试验试验,这样比较记得熟。

以上就是本篇关于html col标签的居中和基本的使用方法。有问题的可以在下方提问。

【小编推荐】

HTML img标签的src属性的用法是什么?具体使用方法解析(内附实例)

html单选按钮默认选中怎么做?input标签的单选按钮用法实例

The above is the detailed content of How to center the Chinese characters in the col tag in html? Basic use of html col tag (examples included). 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
Popular Tutorials
More>
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!