我写过这个html表单和一个php脚本。我希望标题和子标题以粗体和不同颜色呈现。有什么建议么。php html form rendering
<form action="myscript.php" method="POST">
<fieldset>
#title#
<p><label for="title"></label>
<input type="text" name="title" size="60" /></p>
<p><label for="Introduction"></label>
<textarea cols="width" rows="height" name="introduction">Introduction...</textarea></p>
#first_title or subtitle#
<p><label for="first_title"></label>
<input type="text" name="first_title" size="60" value="first para title..."></p>
<p><label for="first_para"></label>
<textarea cols="width" rows="height" name="first_para">first paragraph...</textarea></p>
#second_title or subtitle#
<p><label for="second_title"></label>
<input type="text" name="second_title" size="60" value="second para title..."></p>
<p><label for="second_para"></label>
<textarea cols="width" rows="height" name="second_para">second paragraph...</textarea></p>
<br />
<fieldset class="center">
<input type="submit" value="" />
<input type="reset" value="Clear and Restart" />
</fieldset>
</form>
这里是PHP脚本
<?php
foreach($_REQUEST as $value) {
echo "<p>" . $value . "</p>";
}
?>
我增加了一些新的代码,更多的澄清。
你能指定哪些元素是标题和副标题吗?标签或输入?哪个? – SW4
将它们包裹在span标签上,然后使用正常的类或ID –