Table displays the border code you want to display

高洛峰
Release: 2017-02-22 11:35:11
Original
1398 people have browsed it

Commonly used attributes of tables

The basic attributes are: width (width), height (height), border (border value), cellspacing ( The inner width of the table, that is, the distance between the table and tr), cellpadding (the distance between the elements in the table, that is, the distance between tr and tr), bordercolorlight (the bright border color of the table), bordercolordark (the dark border color of the table) , bgcolor (the background color of the table), background (the background image of the table), bordercolor (the color of the table border)

Attributes of the internal dividing lines of the table

What works is the rules parameter, which has three values ​​(cols, rows, none).

When rules=cols, the table will hide the horizontal dividing line, that is, we can only see to the columns of the table;

When rules=rows, the vertical dividing line is hidden, that is, we can only see the rows of the table;

When rules=none, the vertical The dividers and horizontal dividers will all be hidden, and we can only see the outer frame of a table

Attributes of the table's external dividers

The display and hiding of the outer border of the table can be controlled using the frame parameter. Note: It only works on the outer border of the table, not on the internal edges and lines.

Only displays the upper border

Only displays the lower border

Only display left and right borders

Only display upper and lower borders

Only display left Border

Only display the right border

Do not display any border

<table summary="学生名单,包括学生编号、姓名、联系电话、和地址。">  
    <caption>学生名单</caption>  
    <thead>  
        <th scope="col">编号</th>  
        <th scope="col">姓名</th>  
        <th scope="col">联系电话</th>  
        <th scope="col">地址</th>  
    </thead>  
    <tfoot>  
        <td colspan="4">班主任:</td>  
    </tfoot>  
    <tbody>  
        <tr>  
            <td>1</td>  
            <td>Jamson</td>  
            <td>123-45678</td>  
            <td>XX市XX区XX号</td>  
        </tr>  
        <tr>  
            <td>2</td>  
            <td>Grace</td>  
            <td>123-45678</td>  
            <td>XX市XX区XX号</td>  
        </tr>  
        <tr>  
            <td>3</td>  
            <td>Dizzy</td>  
            <td>123-45678</td>  
            <td>XX市XX区XX号</td>  
        </tr>  
    </tbody>  
</table>
Copy after login

Update For articles related to multi-Table displaying the border code you want to display, please pay attention to 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!