为什么我的第一个HTML表格列没有粗体文​​本? [英] Why doesn't my first HTML table column have bold text?

查看:84
本文介绍了为什么我的第一个HTML表格列没有粗体文​​本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 col 标签的理解告诉我,以下应该将我的第一个表格列中的文本设置为粗体,但这不会发生。我做错了什么?

My understanding of the col tag tells me that the following should style text in my first table column as bold, but this is not happening. What am I doing wrong?

<table class="span-12">
    <col style="font-weight: bold;" />
    <col />
    <tr>
        <td>
            Client
        </td>
        <td>
            Apartment Applied Visual Arts
        </td>
    </tr>
</table>


推荐答案

表格数据单元不是col元素的后代,所以他们不会从中继承任何属性。请参阅CSS规范的列部分

The table data cells are not descendants of the col element, so they do not inherit any properties from it. See the columns section of the CSS specification.

这篇关于为什么我的第一个HTML表格列没有粗体文​​本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆