Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 添加表格边框_Html_Html Table - Fatal编程技术网

Html 添加表格边框

Html 添加表格边框,html,html-table,Html,Html Table,这可能是一个愚蠢的错误,但我在谷歌上搜索并尝试了所有可能出现在代码错误位置的想法,但我似乎无法找到为我的表提供边框/框的代码/快捷方式/魔术: <Table bored = "5" cellpadding ="5px" > <tr> <td>"sentence" <td/> <td><input type="radio" name="question7" value="0"<td/><br/><br

这可能是一个愚蠢的错误,但我在谷歌上搜索并尝试了所有可能出现在代码错误位置的想法,但我似乎无法找到为我的表提供边框/框的代码/快捷方式/魔术:

<Table bored = "5" cellpadding ="5px" >

<tr>
<td>"sentence" <td/> <td><input type="radio" name="question7" value="0"<td/><br/><br/>
<tr/>

<tr>
<td>"sentence."<td/> <td> <input type="radio" name="question7" value="0"<td/> <br/><br/>
<tr/>
<table/>
这只是if的一小部分,但显示时没有行,因此没有清晰的表格。任何帮助都会很好

<Table bored = "5" cellpadding ="5px" >
不正确,您确实想要:

<Table border = "5" cellpadding = "5px">
“无聊”绝对是该属性的错误名称,如果您真的想使用它,应该将其替换为border。不过你最好不要这样做,因为它已经过时了。有关详细信息,请参阅-页。更好的方法是在class属性中设置css中定义的类名,或者像这样设置style属性:

style="border: 5px;"

细胞填充也是如此。对于表,此属性也不推荐使用

那么这就是你所期待的

<Table border = "5" cellpadding ="5px" >

好的、干净的解决方案是将样式定义放在HTML文档的头部和样式部分。像这样:

   <head>
   <style>
   table { border-collapse:collapse;}
   table,th, td{ border: 5px solid black; }
   </style>
   </head>
   <body>
   <table width="100%" cellspacing="5" cellpadding="5">
     <tr>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
     </tr>
   </table>
   </body>
   </html>

这不是桌子边框=1吗?我想这可能是一张无聊的桌子。你在使用CSS吗?Relic Set,说“我爱你,是的,我是个白痴”是否不好:谢谢你给我指出了那个可怕的错误:嗯,try style=border:1px纯红;