1. The basic syntax format for creating a form is as follows:
<from action=”url 地址”method=”提交方式”name=”表单名称”> 各种表单控件 </form>
The following example:
P212-213 <!doctype html> <html> <head> <meta charset=”utf-8”> <title>创建表单</title> </head> <body> <from action=”http://www.mysite.cn/index.asp”method=”post” id=”formBox”autocomplete=”on”> 用户名: <input type=”text”id=”autofirst”name=”autofirst”/><br/><br/> 账号: <input type=”text”name=”zhanghao”/> 密码: <input type=”password”name=”mima”/> <input type=”submit”value=”提交”/> </form> </body> </html>
2. The type attribute of the input element
(1) Single-line text input box
Username: name; Account: value; ID number: maxlength
(2) Password input box
(3)Radio button
(4)Check box
(5)Normal button
(6)Submit button
( 7) Reset button
(8) Submit button in image form
(9) Hidden field
(10)File field
(11)email type
(12)url type
(13)tel type
(14)search type
(15)color type
(16)number type
<input type=”number”name=”number1”value=”1”min=”1”max=”20”step=”4”/><br/>
(17)range type
(18)Date pickers type
<form action=”#”method=”get”> <input type=”date”/>; <input type=”month”/>; <input type=”week”/>; <input type=”time”/>; <input type=”datetime”> <input type=”datetime-local”/> <input type=”submit”value=”提交”/> </form>
3. Other elements
(1)list attribute
<form action=”#”method=”get”> 请输入网址:<input type=”url”list=”url_list”name=”weburl”/> <datalist id=”url_list”> <option label=”新浪”value=”http://www.sina.com.cn”></option> <option label=”搜狐”value=”http://www.sohu.com.cn”></option> <option label=”传智”value=”http://www.itcast.cn/”></option> </datalist>
(2)multiple attribute
<form action=”#”method=”get”> 电子邮箱:<input type=”email”name=”myemail”multiple=”true”/> 上传照片:<input type=”file”name=”selfile”multiple=”true”/><br/><br/> <input type=”submit”value=”提交“/> </form>
(3)placeholder attribute
<form actiom=”#”method=”get”> 请输入邮政编码:<input type=”text”name=”code”pattern=”[0-9]{6}”placeholder=”请输入6位数的邮政编码”/> <input type=”submit”value=”提交”/> </form>
(4) textarea element
<textarea cols=”每行中的字符数”rows=”显示的行数“> 文本内容 </textarea>
Example:
<form action=”#”method=”post”> 评论:<br/> <textarea cols=”60”rows=”8”> 评论的时候,请遵纪守法并注意语言文明。 </textarea><br/> <input type=”submit”value=”提交”/> </form>
(5) select element
<select> //<optgroup> <option>1</option> <option>2</option> <option>3</option> </select>
(6) datalist element
<form action=”#”method=”post”> 请输入用户名:<input type=”text”list=”namelist”/> <datalist id=”namelist”> <option>admin</option> <option>lucy</option> </datalist> <input type=”submit”value=”提交”/> </form>
(7)keygen element
<form action=”#”method=”get”> 请输入用户名:<input type=”text”name=”user_name”/><br/> 请选择加密强度:<keygen name=”security”/><br/> <input type=”submit”value=”提交”/> </form>
Form style
<!doctype html> <html><head> <meta charset="utf-8"> <title>CSS控制表单样式</title> <style type="text/css"> body{ font-size:12px; font-family:"宋体";} body,form,input,p{ padding:0; margin:0; border:0;} form{ width:320px; height:150px; padding-top:20px; margin:50px auto; background:#f5f8fd; border-radius:20px; border:3px solid #4faccb; } p{ margin-top:15px; text-align:center; } p span{ width:40px; display:inline-block; text-align:right; } .num,.pass{ width:152px; height:18px; border:1px solid #38a1bf; padding:2px 2px 2px 22px; } .num{ background:url(images/1.jpg) no-repeat 5px center #FFF; color:#999; } .pass{ background:url(images/2.jpg) no-repeat 5px center #FFF; } .btn01,.btn02{ width:60px; height:25px; border-radius:3px; border:1px solid #6b5d50; margin-left:30px; } .btn01{ background:#3bb7ea;} .btn02{ background:#fb8c16;} </style> <link rel="stylesheet" href="Untitled-1.css" type="text/css"> </head> <body> <form action="#" method="post"> <p> 登录:<input type="tel" name="telphone" pattern="^\d{11}$" required/> </p> <p> 密码:<input type="tel" name="telphone" pattern="^\d{11}$" required/> </p> <p> <input type="button" class="btn01" value="登录"/> <input type="button" class="btn02" value="注册"/> </p> </form> </body> </html>
The above is the application content of html5+css3|form, more For more related content, please pay attention to the PHP Chinese website (www.php.cn)!

H5 is not just the abbreviation of HTML5, it represents a wider modern web development technology ecosystem: 1. H5 includes HTML5, CSS3, JavaScript and related APIs and technologies; 2. It provides a richer, interactive and smooth user experience, and can run seamlessly on multiple devices; 3. Using the H5 technology stack, you can create responsive web pages and complex interactive functions.

H5 and HTML5 refer to the same thing, namely HTML5. HTML5 is the fifth version of HTML, bringing new features such as semantic tags, multimedia support, canvas and graphics, offline storage and local storage, improving the expressiveness and interactivity of web pages.

H5referstoHTML5,apivotaltechnologyinwebdevelopment.1)HTML5introducesnewelementsandAPIsforrich,dynamicwebapplications.2)Itsupportsmultimediawithoutplugins,enhancinguserexperienceacrossdevices.3)SemanticelementsimprovecontentstructureandSEO.4)H5'srespo

The tools and frameworks that need to be mastered in H5 development include Vue.js, React and Webpack. 1.Vue.js is suitable for building user interfaces and supports component development. 2.React optimizes page rendering through virtual DOM, suitable for complex applications. 3.Webpack is used for module packaging and optimize resource loading.

HTML5hassignificantlytransformedwebdevelopmentbyintroducingsemanticelements,enhancingmultimediasupport,andimprovingperformance.1)ItmadewebsitesmoreaccessibleandSEO-friendlywithsemanticelementslike,,and.2)HTML5introducednativeandtags,eliminatingthenee

H5 improves web page accessibility and SEO effects through semantic elements and ARIA attributes. 1. Use, etc. to organize the content structure and improve SEO. 2. ARIA attributes such as aria-label enhance accessibility, and assistive technology users can use web pages smoothly.

"h5" and "HTML5" are the same in most cases, but they may have different meanings in certain specific scenarios. 1. "HTML5" is a W3C-defined standard that contains new tags and APIs. 2. "h5" is usually the abbreviation of HTML5, but in mobile development, it may refer to a framework based on HTML5. Understanding these differences helps to use these terms accurately in your project.

H5, or HTML5, is the fifth version of HTML. It provides developers with a stronger tool set, making it easier to create complex web applications. The core functions of H5 include: 1) elements that allow drawing graphics and animations on web pages; 2) semantic tags such as, etc. to make the web page structure clear and conducive to SEO optimization; 3) new APIs such as GeolocationAPI support location-based services; 4) Cross-browser compatibility needs to be ensured through compatibility testing and Polyfill library.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Zend Studio 13.0.1
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Mac version
God-level code editing software (SublimeText3)

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft