Html表格边框仅在外部显示 [英] Html table borders are only showing on the outside

查看:493
本文介绍了Html表格边框仅在外部显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在尝试在html中创建一个表,但它只显示外部边界

所以它看起来像一个盒子。有谁知道我该如何修复它?

谢谢



我的尝试:



 <   table  > ;  
< 标题 > aaaaaaaa < / caption > ;

< tbody > < tr >
< th > aaaaaaaa < / th >
< th > aaaaaaaa < / th >
< th > aaaaaaaa < / th >
< th > aaaaaaaa < / th >
< / tr >


< tr >
< td > aaaaaaaa < / td >
< td > aaaaaaaa < / td >
< td > aaaaaaaa < / td >
< td > aaaaaaaa < / td >
< / tr >


< tr >
< td > aaaaaaaa < / td >
< td > aaaaaaaa < / td >
< td > aaaaaaaa < / td >
< td > aaaaaaaa < / td >
< / tr > ;

< / tbody > < / table >

解决方案

试试这个

 < span class =code-keyword><   table     cellpadding   =  0    cellspacing   =  0    style   =  border-collapse:collapse    border   =  1 >  


您需要设置表格样式以定义所需的边框和规则(表格条目之间的行)。在HTML5中,您需要使用CSS,在HTML4中,您可以使用表元素的 frame 规则属性。 / blockquote>

看看这个: HTML Tables [ ^ ]


Hello, I am trying to make a table in html but it is only showing the outside borders
so it looks like a box.Does anyone knows how can I fix it?
Thank you

What I have tried:

<table> 
<caption>aaaaaaaa</caption>
								
		<tbody><tr>
			<th>aaaaaaaa</th>	
			<th>aaaaaaaa</th>	
			<th>aaaaaaaa</th>
			<th>aaaaaaaa</th>
		</tr>
			
								
		<tr>
			<td>aaaaaaaa</td>
			<td>aaaaaaaa</td>
			<td>aaaaaaaa</td>
			<td>aaaaaaaa</td>
		</tr>
	
								
		<tr>
			<td>aaaaaaaa</td>
			<td>aaaaaaaa</td>
			<td>aaaaaaaa</td>
			<td>aaaaaaaa</td>
		</tr>
	
					</tbody></table>

解决方案

try this

<table cellpadding="0" cellspacing="0" style="border-collapse:collapse" border="1">


You need to set the table styles to define what kind of borders and rules (lines between the table entries) you want. In HTML5 you need to use CSS, in HTML4 you can use the frame and rules attributes of the table element.


Check this out: HTML Tables[^]


这篇关于Html表格边框仅在外部显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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