预标记添加新行

时间:2012-08-02 04:31:41

标签: html css

段落中有一个表格。表格内的单元格有额外的新行。以下是代码的相关部分。

<!DOCTYPE html>
<html>
    <head>
        <style type="text/css">
            div.Page1773023 {}
            .f31 {font-family:Times New Roman;font-size:12.00pt;font-style:normal;font-weight:normal;line-height:114%;}
            .f1 {font-family:Arial;font-size:10.00pt;font-style:normal;font-weight:normal;line-height:114%;}
        </style>
    </head>
    <body>
        <div class="Page1773023" style="height:1056px;width:816px;">
            <p class="normal"><pre>
                <table class="normal" style="width:99.00px;border-spacing:0px;border-collapse:collapse;border:1.00px solid #000000;;">
                    <tr>
                        <td style="height:16.000px;width:96.000px;;;" >
                            <p class="normal"><pre>
                            <span class="f1" style="color:#FF0000;" >11111</span></pre></p>
                        </td>
                    </tr>
                </table><br style="clear:left;"/>
            </pre></p>
        </div>
    </body>
</html>

现在,当我从最外层<pre>删除<p>标记时,看不到新行。任何想法为什么会发生这种情况?

1 个答案:

答案 0 :(得分:1)

<pre><table>之间的新行显示在<pre>标记内。这可以通过将它们放在同一行来修复:<pre><table ...>