php表单标题怎么设置字体-PHP问题

资源魔 37 0

php表单题目怎样设置字体

对于网页字体的设置咱们能够应用css款式来做,详细的属性是font-family。上面来看看怎样设置form表单的题目吧。

一、起首form里有一个h2标签,用来显示form的题目。

<form action="form_action.php" method="get">
<h2 class="form-title">更名</h2>
<p>First name: <input type="text" name="fname" /></p>
<p>Last name: <input type="text" name="lname" /></p>
<input type="submit" value="Submit" />
</form>

二、而后咱们正在head里写上style标签,并加之款式。

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.form-title{
font-family:"Times New Roman",Georgia,Serif;
}
</style>
</head>
<body>
<form action="form_action.php" method="get">
<h2>题目</h2>
<p>First name: <input type="text" name="fname" /></p>
<p>Last name: <input type="text" name="lname" /></p>
<input type="submit" value="Submit" />
</form>
</body>
</html>

font-family能够设置应用哪一种字体,字体名没有需求引号,但字体名有空格就需求应用引号包裹。

注:h1-h6为通用题目,h1每一个页面只能应用一次,多了无益于seo。

更多PHP相干常识,请拜访PHP中文网!

以上就是php表单题目怎样设置字体的具体内容,更多请存眷资源魔其它相干文章!

标签: php php教程 字体 php故障解决 php使用问题 表单标题

抱歉,评论功能暂时关闭!