如何在表格下设置Php <tr>标签的样式,以将字体设置为x-large

时间:2019-06-22 06:47:24

标签: php css styling

我需要对该标签进行样式化,以使文本显示为x大,我不能简单地在php中这样做,因为它不起作用。

我尝试过样式设置,但是对PHP有点陌生

echo "<tr>";
echo "<td>";
echo "First Name";
echo "</td>";
echo "<td>";
echo "Surname";
echo "</td>";
echo "<td>";
echo "Home Address";
echo "</td>";
echo "<td>";
echo "Email Address";
echo "</td>";
echo "<td>";
echo "Phone";
echo "</td>";
echo "</tr>";

1 个答案:

答案 0 :(得分:0)

也许下面的代码可能有帮助。

<html>
<head>
    <title>Hello World</title>
    <style>
        table tr{
            font-size: 25px;
            font-weight: bold;
        }
    </style>
</head>
<body>
    <?php
        echo"
          <table>
                <tr>
                  <td>First Name</td>

                  <td>SurName</td>

                  <td>Email</td>

                  <td>Home Address</td>

                  <td>Phone Number</td>
                </tr>
          </table>
        ";
      ?>
   </body>
 </html>