search
HomeBackend DevelopmentPHP ProblemHow to set font for php form title

How to set font for php form title

Oct 31, 2019 pm 03:05 PM
phpfont

How to set font for php form title

How to set the font for the php form title

We can use css style to set the web font, specifically The attribute is font-family. Let’s take a look at how to set the title of the form.

1. First, there is an h2 tag in the form, which is used to display the title of the form.

<form action="form_action.php" method="get">
<h2 id="改名">改名</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>

2. Then we write the style tag in the head and add the 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 id="标题">标题</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 can set which font to use. The font name does not require quotation marks, but if the font name has spaces, it needs to be wrapped in quotation marks.

Note: h1-h6 are common headings, h1 can only be used once per page, and more is not conducive to SEO.

For more PHP related knowledge, please visit PHP Chinese website!

The above is the detailed content of How to set font for php form title. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools