HTML基础内容详解

巴扎黑
Release: 2017-04-15 09:05:40
Original
2433 people have browsed it

HTML简介

什么是HTML

  • HTML(Htyper Text Markup Language):即超文本标记语言。

  • 超文本:指可以包含图片、链接,甚至音乐、程序等非文字元素。

  • 标记语言:由标记(标签)构成的语言。

什么是标签

  • 由一对尖括号包裹的单词构成,例如:

  • 标签不区分大小写, 和 一样,推荐使用小写。

  • 有些标签使用一个标签即可,叫做自闭和标签,例如:


  • 标签可以嵌套,但是不能交叉嵌套

什么是标签属性

  • 通常是以键值对形式出现的,例如 name="nick"

  • 属性只能出现在开始标签或自闭和标签中

  • 属性名字全部小写

  • 属性值必须使用双引号或单引号包裹 例如,name="nick"

  • 如果属性值和属性名完全一样.直接写属性名即可,例如:readonly

HTML5基本结构

<!DOCTYPE HTML>
<html>
    <head>
    </head>
    <body>
    </body>
</html>
Copy after login
Copy after login

HTML5如何指定字符集

  • 使用Content-Type指定字符集<br><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />

  • 直接使用charset指定字符集<br><meta charset="UTF-8" />

<hr>

标签

</h3> <p>显示在浏览器的标题栏</p> <h3><base/></h3> <p>为页面上的所有链接规定默认地址或默认目标。</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <title>Title</title>     <base href="https://segmentfault.com/u/jerry_fe/"/>     <base target="_blank" /> </head> <body>     <img src="jerry.png" alt="图片加载失败。。。"/>     <a href="https://segmentfault.com/u/jerry_fe/">my blogs</a> </body> </html></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p>以上代码中,<img>的src属性时一个相对路径,因为<head>中通过base标签设置了链接的默认地址,<br>所以img的src实际的地址是“https://segmentfault.com/u/je...”。<br>而a标签中只是指定了href,并未指定target属性,所以也会使用base中设置的target属性的值。</p> <h3><link/></h3> <p>引用外部文档,常见于引用外部样式。重要属性有三个:rel、href、type。<br><strong>rel用于规定文档与被链接文档之间的关系【<em>注:必须</em>】:</strong></p> <ul class=" list-paddingleft-2"> <li><p>rel="dns-prefetch"  预先解析缓存文档中使用的域名,目的是为了提高网页访问速度。使用场景:在一个网页频繁使用其他域名资源时。</p></li> <li> <p>rel="shortcut icon"或rel="icon"  在收藏和标题栏上用于显示的图标。示例:<link rel="icon" href="https://segmentfault.com/u/je...。注意:IE浏览器只支持ico格式,为了兼容IE,图片文件最好采用ico格式。</p></li><li><p>rel="stylesheet" 引用外部样式表。</p></li><li><p>rel="nofollow" 用于指示搜索引擎不要追踪(爬虫不要抓取),从而减少垃圾链接。使用场景:不希望被信任或是不希望被搜索引擎录入的网站。</p></li></ul><p><strong>href用于规定资源的路径(绝对路径/相对路径)【<em>注:必须</em>】。</strong><br/><strong>type用于规定被链接文档的MIME类型,用于明确文件的打开方式,【<em>注:非必须</em>】。例如:.css文件的MIME类型为text/css,而.ico文件的MIME类型为image/x-icon。</strong></p><h3><meta/></p> <p>用于定义与该HTML文档相关的元数据。最常见的用途是指定当前文档所用的字符集<code><meta charset="UTF-8"/></code><br>重要的属性有三个:http-equiv、name、content<br><strong>http-equiv把content属性值关联到http头部,可能的值为:</strong></p> <ul class=" list-paddingleft-2"> <li><p><strong><em>content-type</em></strong> 用于规定浏览器接受的文档类型,一般为text/html,即content的值一般设为text/html。</p></li> <li><p><strong><em>refresh</em></strong> 用于规定网页自动刷新的频率,时间以秒为单位(切记不是毫秒),也可设定刷新后跳转的路径,即content的值一般设为刷新的间隔秒数以及跳转路径。</p></li> <li> <p><strong><em>expires</em></strong> 用于设定网页到期时间,一旦到期,必须到服务器上重传。</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <meta http-equiv="refresh" content="2"> <meta http-equiv="refresh" content="2;URL=https://www.baidu.com"> <meta http-equiv="expires" content="6 Jun 2016"/></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> </li> </ul> <p><strong>name为content属性值赋予一个含义或功能,可能的值为:</strong></p> <ul class=" list-paddingleft-2"> <li><p><strong><em>keywords</em></strong> 将content值定义为供搜索引擎抓取信息的关键字</p></li> <li><p><strong><em>description</em></strong> 将content值定义为搜索引擎搜索后,在搜索结果中显示的简单网页描述</p></li> <li><p><strong><em>author</em></strong> 将content值规定为网页制作者的信息</p></li> <li> <p><strong><em>generator</em></strong> 将content值规定为网页生成工具的信息</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><meta name="keywords" content="我是关键字"> <meta name="description" content="我是简要描述"> <meta name="author" content="https://segmentfault.com/u/jerry_fe"> <meta name="generator" content="用以说明生成工具"></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> </li> </ul> <p><strong>content  定义与http-equiv或name属性相关的元信息,是必要的属性。</strong></p> <hr> <h1><body>标签</h1> <h3>1.块级元素(block)和内联元素(inline)</h3> <p><strong>块级元素:</strong><h1>~<h6>、<p>、<p>、<ol>、<ul>、<table>、<form><br><strong>行内元素:</strong><code><a></code>、<img>、<input>、<span>、<textarea>、<code><sub></code>、<code><sup></code></p> <p><strong>block元素的特点:</strong></p> <ul class=" list-paddingleft-2"> <li><p>总是在新行上开始;</p></li> <li><p>行高以及外边距和内边距都可控制;</p></li> <li><p>宽度默认是容器的100%,除非设定一个宽度;</p></li> <li><p>可容纳内联元素和其他块元素。</p></li> </ul> <p><strong>inline(内联)元素的特点:</strong></p> <ul class=" list-paddingleft-2"> <li><p>和其他元素都在一行上;</p></li> <li><p>行高及外边距和内边距不可改变;</p></li> <li><p>宽度就是它的文字或图片的宽度,不可改变;</p></li> <li><p>只能容纳文本或者其他内联元素。</p></li> </ul> <p><strong>行内元素,需要注意:</strong></p> <ul class=" list-paddingleft-2"> <li><p>设置宽度width无效;</p></li> <li><p>设置高度height无效,可以通过line-height来设置;</p></li> <li><p>设置margin只有左右margin有效,上下无效;</p></li> <li><p>设置padding只有左右padding有效,上下则无效。注意元素范围是增大了,但是对元素周围的内容是没影响的。</p></li> </ul> <h3>2.基本标签</h3> <p><h1>~<h6>: 标题标签<br><p>: 段落标签,包裹的内容被换行,并且上下内容之间有一行空白。<br>    style="text-indent: 2em"可以设置样式为首行缩进两个字符。<br>    <blockquote></blockquote>可以用来设置整个段落的缩进。<br><code><strong> <b></code>: 加粗标签<br><strike>: 为文字加上一条中线<br><u>: 文字下方加下划线<br><code><em> <i></code>: 文字变成斜体<br><code><sup> <sub></code>: 上角标 和 下角标<br><code><br></code>: 换行<br><code><hr></code>: 水平线<br><p>: 块标签。</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">  块级标签常用于布局,行级标签常用于显示内容。   p的显示通常使用id或class来标识。id为唯一的标签标识,class为标签的类标识。   p的大小是由内容来决定的,默认情况下,高度由内容的高度决定,宽度适应屏幕。</pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p><span>: 可以容纳其他元素,是一个容器。</p> <h3>3.特殊符号</h3> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">"    &quot; < &lt; >    &gt; 空格  ©    &copy; &    &amp; ¥    &yen; £    &pound;</pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <h3>4.<code><a></code>超链接标签(锚标签)</h3> <p>重要属性有三个:href、target、name</p> <ul class=" list-paddingleft-2"> <li><p>href  超链接地址:可以是Web上任意资源,包括图片,网页,样式,脚本文件等。href="#"时,表示被链接页面就是当前页面。</p></li> <li><p>target  文档打开时要显示的目标位置,属性值一般有:_blank(新窗口中打开)、_self(默认,在超链接所在的容器中打开)、_parent(在超链接的父容器中打开)、_top(超链接所在的顶层容器中打开)、name(名称为name的框架中打开)。</p></li> <li><p>name  锚标记名称。作用:跳转到文档的某个地方。返回首页。</p></li> </ul> <p>网页跳转:</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><a href="https://segmentfault.com/u/jerry_fe/" target="_blank">Nick Blogs</a></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p>锚标记跳转:</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><a name="mao"><h3>这是一个锚标记</h3></a> <p style="height: 800px"></p> <a href="#mao">跳转至锚标记</a></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <h3>5.<img>图片标签</h3> <p>重要属性有:src、title、alt、width、height、align。</p> <ul class=" list-paddingleft-2"> <li><p>src  图片地址</p></li> <li><p>title  鼠标悬浮在图片上的文字</p></li> <li><p>alt  图片找不到时要替换的文字。如果图片资源使用的是外网资源,则不会显示要替换的文字。如果使用的是本网站的资源(相对路径给出),则找不到图片时会显示替换的文字,并保留图片设置的宽高结构。</p></li> <li><p>align  图片周围文字的垂直对齐情况。常用的属性值有:top(与图片的顶部对齐)、middle(与图片的中部对齐)、bottom(默认,与图片的底部对齐)。</p></li> <li><p>width  图片的宽</p></li> <li> <p>height  图片的高 (宽高两个属性,若只写一个会,自动等比缩放)</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><img src="https://segmentfault.com/u/jerry_fe/jerry.png" alt="图片加载失败。。。" title="This is a picture."/></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> </li> </ul> <h3>6.列表标签</h3> <p><ul>: 无序列表标签</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">    <li>: 列表中的每一项.</pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p><ol>: 有序列表标签</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">    <li>: 列表中的每一项.</pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p><li>主要的属性有:type、value两个:</p> <ul class=" list-paddingleft-2"> <li><p>type指明列表项的类型,属性值有:A,a,I,i,1,disc(实心圆),square(实心正方形),circle(空心圆)。</p></li> <li><p>value表示序号值从几开始。</p></li> </ul> <p><dl> 定义列表</p> <ul class=" list-paddingleft-2"> <li><p><dt> 列表标题</p></li> <li> <p><dd> 列表项</p> <p><ul></p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"> <li type="circle">A</li>  <li type="1">B</li>  <li type="1">C</li></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p></ul><br> <ol></p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"> <li value="3">3</li>  <li>4</li></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p></ol><br> <dl></p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"> <dt><i>标题</i></dt>  <dd>第一项</dd>  <dd>第二项</dd>  <dd>第三项</dd></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p></dl></p> </li> </ul> <h3>7.<table> 表格标签</h3> <table> <thead><tr class="firstRow"> <th>序号</th> <th>姓名</th> </tr></thead> <tbody> <tr> <th>1.</th> <td>Jerry</td> </tr> <tr> <th>2.</th> <td>Ferry</td> </tr> </tbody> </table> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><table border="1">     <thead>         <tr>             <th>序号</th>             <th>姓名</th>         </tr>     </thead>     <tbody>         <tr>             <th>1.</th>             <td>Jerry</td>         </tr>         <tr>             <th>2.</th>             <td>Ferry</td>         </tr>     </tbody> </table></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p><strong>table标签的主要属性:</strong></p> <ul class=" list-paddingleft-2"> <li><p><strong>border</strong>     表格边框</p></li> <li><p><strong>align</strong>      水平对齐方式</p></li> <li><p><strong>bgcolor</strong>    背景颜色</p></li> <li><p><strong>cellpadding</strong> 内边距,单元格与内容之间的距离</p></li> <li><p><strong>cellspacing</strong> 外边距,单元格的间距,设置为0时,表格变为实线表格</p></li> <li><p><strong>width</strong> 表格的宽度,可以用%或者像素,最好通过css来设置长宽</p></li> </ul> <p><strong><caption></strong> 表格的标题<br><strong><tr></strong> 表格的行<br><strong><th></strong> 表格的表头名称,与<td>不同在于文字采用加粗居中的形式显示<br><strong><td></strong> 单元格,用来显示表格内容<br><strong><thead></strong> 表格头部,使结构更加分明<br><strong><tbody></strong> 表格主体部分,使结构更加分明<br><strong>rowspan</strong> 单元格竖跨多少行,作用在th或者td上<br><strong>colspan</strong> 单元格横跨多少列(即合并单元格),作用在th或者td上。(即横跨、竖跨都是作用在th或td上)</p> <h3>8.<form>表单标签</h3> <p><strong>表单属性</strong><br>HTML 表单用于接收不同类型的用户输入,用户提交表单时向服务器传输数据,从而实现用户与Web服务器的交互。<br>属性:action、method、enctype</p> <ul class=" list-paddingleft-2"> <li><p><strong><em>action</em></strong> 表单要提交的地址,用于处理表单的内容(一般是提交到后台的一个接口,这个接口可以是java写成的,提交到这个接口后后台就知道如何处理这些数据了)。</p></li> <li><p><strong><em>method</em></strong>  提交的方法,默认是get方式提交。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p><strong>get</strong>:1.提交的键值对显示在地址栏url后面; 2.安全性相对较差; 3.对提交内容的长度有限制</p></li> <li><p><strong>post</strong>:1.提交的键值对不显示在地址栏; 2.安全性相对较高; 3.对提交内容的长度理论上无限制</p></li> </ul> <li><p><strong><em>enctype</em></strong> 对表单数据进行编码</p></li> </ul> <p><strong>表单元素</strong><br><input> type属性可能的值:</p> <ul class=" list-paddingleft-2"> <li><p><strong><em>text</em></strong> 文本框输入(type的默认类型)</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p><strong>autocomplete</strong>(自动完成输入的内容,要求表单元素要有name属性才有自动完成的效果,off表示自动完成不可用,on表示自动完成可用)</p></li> <li><p><strong>disabled</strong>(设置或者获取控件的状态,默认是false即可用,等于true时不可用,不能输入内容)</p></li> </ul> <li><p><strong><em>password</em></strong>密码框。(以下属性text和password共有)</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p><strong>size</strong>(指定表单元素的初始宽度。当type为text或password时,表单元素的大小以字符为单位,对于其他元素,宽度以像素为单位)</p></li> <li><p><strong>maxlength</strong>(type为text或password时,表示输入的最大字符数),有利于防止sql的注入攻击</p></li> <li><p><strong>readonly</strong>设置为只读状态</p></li> <li><p><strong>placeholder</strong>设置框内预置内容(灰色),焦点选中时消失</p></li> </ul> <li><p><strong><em>radio</em></strong> 单选按钮</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p><strong>name</strong>(将name的值设置为相同值,才表示一组数据,才能实现单选功能)</p></li> <li><p><strong>value</strong>(必须要写,提交到服务器的key值,实际开发过程中value一般是编号)</p></li> <li><p><strong>checked</strong>(设置是否被默认选中)</p></li> </ul> <li><p><strong><em>checkbox</em></strong>  复选框</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p><strong>name</strong>(将name的值设置为相同值,才表示一组数据,才能添加到同一value值列表并提交到服务器)</p></li> <li><p><strong>value</strong>(必须要写,提交到服务器的key值,实际开发过程中value一般是编号)</p></li> <li><p><strong>checked</strong>(设置是否被默认选中)</p></li> </ul> <li><p><strong><em>file</em></strong>  文件域,用于上传文件(不同的浏览器表现形式不同)</p></li> <li><p><strong><em>submit</em></strong>  提交按钮。用于提交表单。</p></li> <li><p><strong><em>reset</em></strong>  重置按钮。清空表单的输入,恢复到表单默认的状态。</p></li> <li><p><strong><em>button</em></strong>  普通按钮。一般结合javascript使用。</p></li> <li><p><strong><em>image</em></strong>  图片按钮,用来提交表单,与submit是一样的效果。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"><li><p>src(图片路径)</p></li></ul> <li><p><strong><em>hidden</em></strong>  隐藏字段。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"><li><p>value(隐藏的内容)</p></li></ul> <li><p><strong><em>color</em></strong>  颜色标签。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"><li><p>value 指定颜色值(采用#十六进制数表示)。</p></li></ul> <li><p><strong><em>date</em></strong>  日期。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"><li><p>value值指定默认的日期,格式为<strong><em>*-</em></strong>-*(年月日)。</p></li></ul> <li><p><strong><em>datetime-local</em></strong>  显示本地时间</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"><li><p>value值指定默认的时间,格式为2017-04-13T23:10:10(年月日T时分秒)。</p></li></ul> <li><p><strong><em>number</em></strong>  数字向上或者向下滑动。可以填数字然后向上或者向下选择不同的值。</p></li> <li><p><strong><em>range</em></strong>  滑动标签。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p>min(指定最小值)</p></li> <li><p>max(指定最大值)</p></li> <li><p>value(指定当前默认值)。</p></li> </ul> <li><p><strong><em>week</em></strong>  每年的周数。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"><li><p>value指定哪一年第几周,格式为2017-W20(2017年第20周)。</p></li></ul> </ul> <p><textarea> 文本域标签。默认表现形式是可以输入很多行文本的文本框。</p> <ul class=" list-paddingleft-2"> <li><p><strong>name</strong> 表单提交项的key</p></li> <li><p><strong>cols</strong> 设置文本域宽度</p></li> <li><p><strong>rows</strong> 设置文本域高度,即行数</p></li> </ul> <p><select> 下拉框标签。使用时要结合<option>子标签一起使用。</p> <ul class=" list-paddingleft-2"> <li><p><strong>name</strong> 表单提交项的key</p></li> <li><p><strong>size</strong> 选项个数</p></li> <li><p><strong>multiple</strong> 多选</p></li> <li><p><strong><option></strong> 下拉选中的每一项</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p>value(表单提交项的值)</p></li> <li><p>selected(selected下拉项默认被选中)</p></li> </ul> <li><p><strong><optgroup></strong> 为同类项加上分组</p></li> </ul> <p><label> 把元素与文本结合起来<br>友好设计:不只是选中复选框才能选中并打钩,要求点击对应的文字也能选中该复选框。<br>这种情况下要用到<label>标签的for属性(设置或获取给定标签对象指定到的对象,值=另一个元素的id号即可)</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><label for="name">姓名</label> <input id="name" type="text"></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p><fieldset> 对表单中的相关元素进行分组</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><fieldset>     <legend>温馨提示</legend>     <p align="middle">不要忘记点赞哦 ==</p> </fieldset></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p>value: 表单提交项的值<br>对于不同的输入类型,value 属性的用法也不同:</p> <ul class=" list-paddingleft-2"> <li><p>type="button", "reset", "submit" - 定义按钮上的显示的文本</p></li> <li><p>type="text", "password", "hidden" - 定义输入字段的初始值</p></li> <li><p>type="checkbox", "radio", "image" - 定义与输入相关联的值</p></li> </ul> <p class="article fmt article__content"><br></p> <h1>HTML简介</h1> <h3>什么是HTML</h3> <ul class=" list-paddingleft-2"> <li><p>HTML(Htyper Text Markup Language):即超文本标记语言。</p></li> <li><p>超文本:指可以包含图片、链接,甚至音乐、程序等非文字元素。</p></li> <li><p>标记语言:由标记(标签)构成的语言。</p></li> </ul> <h3>什么是标签</h3> <ul class=" list-paddingleft-2"> <li><p>由一对尖括号包裹的单词构成,例如:<html></p></li> <li><p>标签不区分大小写,<html> 和 <HTML>一样,推荐使用小写。</p></li> <li><p>有些标签使用一个标签即可,叫做自闭和标签,例如: <br/><hr/><input/><img/></p></li> <li><p>标签可以嵌套,但是不能交叉嵌套</p></li> </ul> <h3>什么是标签属性</h3> <ul class=" list-paddingleft-2"> <li><p>通常是以键值对形式出现的,例如 name="nick"</p></li> <li><p>属性只能出现在开始标签或自闭和标签中</p></li> <li><p>属性名字全部小写</p></li> <li><p>属性值必须使用双引号或单引号包裹 例如,name="nick"</p></li> <li><p>如果属性值和属性名完全一样.直接写属性名即可,例如:readonly</p></li> </ul> <h3>HTML5基本结构</h3> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><!DOCTYPE HTML> <html>     <head>     </head>     <body>     </body> </html></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <h3>HTML5如何指定字符集</h3> <ul class=" list-paddingleft-2"> <li><p>使用Content-Type指定字符集<br><code><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /></code></p></li> <li><p>直接使用charset指定字符集<br><code><meta charset="UTF-8" /></code></p></li> </ul> <hr> <h1><head>标签</h1> <h3><title></h3> <p>显示在浏览器的标题栏</p> <h3><base/></h3> <p>为页面上的所有链接规定默认地址或默认目标。</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <title>Title</title>     <base href="https://segmentfault.com/u/jerry_fe/"/>     <base target="_blank" /> </head> <body>     <img src="jerry.png" alt="图片加载失败。。。"/>     <a href="https://segmentfault.com/u/jerry_fe/">my blogs</a> </body> </html></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p>以上代码中,<img>的src属性时一个相对路径,因为<head>中通过base标签设置了链接的默认地址,<br>所以img的src实际的地址是“https://segmentfault.com/u/je...”。<br>而a标签中只是指定了href,并未指定target属性,所以也会使用base中设置的target属性的值。</p> <h3><link/></h3> <p>引用外部文档,常见于引用外部样式。重要属性有三个:rel、href、type。<br><strong>rel用于规定文档与被链接文档之间的关系【<em>注:必须</em>】:</strong></p> <ul class=" list-paddingleft-2"> <li><p>rel="dns-prefetch"  预先解析缓存文档中使用的域名,目的是为了提高网页访问速度。使用场景:在一个网页频繁使用其他域名资源时。</p></li> <li> <p>rel="shortcut icon"或rel="icon"  在收藏和标题栏上用于显示的图标。示例:<link rel="icon" href="https://segmentfault.com/u/je...。注意:IE浏览器只支持ico格式,为了兼容IE,图片文件最好采用ico格式。</p></li><li><p>rel="stylesheet" 引用外部样式表。</p></li><li><p>rel="nofollow" 用于指示搜索引擎不要追踪(爬虫不要抓取),从而减少垃圾链接。使用场景:不希望被信任或是不希望被搜索引擎录入的网站。</p></li></ul><p><strong>href用于规定资源的路径(绝对路径/相对路径)【<em>注:必须</em>】。</strong><br/><strong>type用于规定被链接文档的MIME类型,用于明确文件的打开方式,【<em>注:非必须</em>】。例如:.css文件的MIME类型为text/css,而.ico文件的MIME类型为image/x-icon。</strong></p><h3><meta/></p> <p>用于定义与该HTML文档相关的元数据。最常见的用途是指定当前文档所用的字符集<code><meta charset="UTF-8"/></code><br>重要的属性有三个:http-equiv、name、content<br><strong>http-equiv把content属性值关联到http头部,可能的值为:</strong></p> <ul class=" list-paddingleft-2"> <li><p><strong><em>content-type</em></strong> 用于规定浏览器接受的文档类型,一般为text/html,即content的值一般设为text/html。</p></li> <li><p><strong><em>refresh</em></strong> 用于规定网页自动刷新的频率,时间以秒为单位(切记不是毫秒),也可设定刷新后跳转的路径,即content的值一般设为刷新的间隔秒数以及跳转路径。</p></li> <li> <p><strong><em>expires</em></strong> 用于设定网页到期时间,一旦到期,必须到服务器上重传。</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <meta http-equiv="refresh" content="2"> <meta http-equiv="refresh" content="2;URL=https://www.baidu.com"> <meta http-equiv="expires" content="6 Jun 2016"/></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> </li> </ul> <p><strong>name为content属性值赋予一个含义或功能,可能的值为:</strong></p> <ul class=" list-paddingleft-2"> <li><p><strong><em>keywords</em></strong> 将content值定义为供搜索引擎抓取信息的关键字</p></li> <li><p><strong><em>description</em></strong> 将content值定义为搜索引擎搜索后,在搜索结果中显示的简单网页描述</p></li> <li><p><strong><em>author</em></strong> 将content值规定为网页制作者的信息</p></li> <li> <p><strong><em>generator</em></strong> 将content值规定为网页生成工具的信息</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><meta name="keywords" content="我是关键字"> <meta name="description" content="我是简要描述"> <meta name="author" content="https://segmentfault.com/u/jerry_fe"> <meta name="generator" content="用以说明生成工具"></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> </li> </ul> <p><strong>content  定义与http-equiv或name属性相关的元信息,是必要的属性。</strong></p> <hr> <h1><body>标签</h1> <h3>1.块级元素(block)和内联元素(inline)</h3> <p><strong>块级元素:</strong><h1>~<h6>、<p>、<p>、<ol>、<ul>、<table>、<form><br><strong>行内元素:</strong><code><a></code>、<img>、<input>、<span>、<textarea>、<code><sub></code>、<code><sup></code></p> <p><strong>block元素的特点:</strong></p> <ul class=" list-paddingleft-2"> <li><p>总是在新行上开始;</p></li> <li><p>行高以及外边距和内边距都可控制;</p></li> <li><p>宽度默认是容器的100%,除非设定一个宽度;</p></li> <li><p>可容纳内联元素和其他块元素。</p></li> </ul> <p><strong>inline(内联)元素的特点:</strong></p> <ul class=" list-paddingleft-2"> <li><p>和其他元素都在一行上;</p></li> <li><p>行高及外边距和内边距不可改变;</p></li> <li><p>宽度就是它的文字或图片的宽度,不可改变;</p></li> <li><p>只能容纳文本或者其他内联元素。</p></li> </ul> <p><strong>行内元素,需要注意:</strong></p> <ul class=" list-paddingleft-2"> <li><p>设置宽度width无效;</p></li> <li><p>设置高度height无效,可以通过line-height来设置;</p></li> <li><p>设置margin只有左右margin有效,上下无效;</p></li> <li><p>设置padding只有左右padding有效,上下则无效。注意元素范围是增大了,但是对元素周围的内容是没影响的。</p></li> </ul> <h3>2.基本标签</h3> <p><h1>~<h6>: 标题标签<br><p>: 段落标签,包裹的内容被换行,并且上下内容之间有一行空白。<br>    style="text-indent: 2em"可以设置样式为首行缩进两个字符。<br>    <blockquote></blockquote>可以用来设置整个段落的缩进。<br><code><strong> <b></code>: 加粗标签<br><strike>: 为文字加上一条中线<br><u>: 文字下方加下划线<br><code><em> <i></code>: 文字变成斜体<br><code><sup> <sub></code>: 上角标 和 下角标<br><code><br></code>: 换行<br><code><hr></code>: 水平线<br><p>: 块标签。</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">  块级标签常用于布局,行级标签常用于显示内容。   p的显示通常使用id或class来标识。id为唯一的标签标识,class为标签的类标识。   p的大小是由内容来决定的,默认情况下,高度由内容的高度决定,宽度适应屏幕。</pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p><span>: 可以容纳其他元素,是一个容器。</p> <h3>3.特殊符号</h3> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">"    &quot; < &lt; >    &gt; 空格  ©    &copy; &    &amp; ¥    &yen; £    &pound;</pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <h3>4.<code><a></code>超链接标签(锚标签)</h3> <p>重要属性有三个:href、target、name</p> <ul class=" list-paddingleft-2"> <li><p>href  超链接地址:可以是Web上任意资源,包括图片,网页,样式,脚本文件等。href="#"时,表示被链接页面就是当前页面。</p></li> <li><p>target  文档打开时要显示的目标位置,属性值一般有:_blank(新窗口中打开)、_self(默认,在超链接所在的容器中打开)、_parent(在超链接的父容器中打开)、_top(超链接所在的顶层容器中打开)、name(名称为name的框架中打开)。</p></li> <li><p>name  锚标记名称。作用:跳转到文档的某个地方。返回首页。</p></li> </ul> <p>网页跳转:</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><a href="https://segmentfault.com/u/jerry_fe/" target="_blank">Nick Blogs</a></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p>锚标记跳转:</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><a name="mao"><h3>这是一个锚标记</h3></a> <p style="height: 800px"></p> <a href="#mao">跳转至锚标记</a></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <h3>5.<img>图片标签</h3> <p>重要属性有:src、title、alt、width、height、align。</p> <ul class=" list-paddingleft-2"> <li><p>src  图片地址</p></li> <li><p>title  鼠标悬浮在图片上的文字</p></li> <li><p>alt  图片找不到时要替换的文字。如果图片资源使用的是外网资源,则不会显示要替换的文字。如果使用的是本网站的资源(相对路径给出),则找不到图片时会显示替换的文字,并保留图片设置的宽高结构。</p></li> <li><p>align  图片周围文字的垂直对齐情况。常用的属性值有:top(与图片的顶部对齐)、middle(与图片的中部对齐)、bottom(默认,与图片的底部对齐)。</p></li> <li><p>width  图片的宽</p></li> <li> <p>height  图片的高 (宽高两个属性,若只写一个会,自动等比缩放)</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><img src="https://segmentfault.com/u/jerry_fe/jerry.png" alt="图片加载失败。。。" title="This is a picture."/></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> </li> </ul> <h3>6.列表标签</h3> <p><ul>: 无序列表标签</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">    <li>: 列表中的每一项.</pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p><ol>: 有序列表标签</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">    <li>: 列表中的每一项.</pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p><li>主要的属性有:type、value两个:</p> <ul class=" list-paddingleft-2"> <li><p>type指明列表项的类型,属性值有:A,a,I,i,1,disc(实心圆),square(实心正方形),circle(空心圆)。</p></li> <li><p>value表示序号值从几开始。</p></li> </ul> <p><dl> 定义列表</p> <ul class=" list-paddingleft-2"> <li><p><dt> 列表标题</p></li> <li> <p><dd> 列表项</p> <p><ul></p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"> <li type="circle">A</li>  <li type="1">B</li>  <li type="1">C</li></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p></ul><br> <ol></p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"> <li value="3">3</li>  <li>4</li></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p></ol><br> <dl></p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"> <dt><i>标题</i></dt>  <dd>第一项</dd>  <dd>第二项</dd>  <dd>第三项</dd></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p></dl></p> </li> </ul> <h3>7.<table> 表格标签</h3> <table> <thead><tr class="firstRow"> <th>序号</th> <th>姓名</th> </tr></thead> <tbody> <tr> <th>1.</th> <td>Jerry</td> </tr> <tr> <th>2.</th> <td>Ferry</td> </tr> </tbody> </table> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><table border="1">     <thead>         <tr>             <th>序号</th>             <th>姓名</th>         </tr>     </thead>     <tbody>         <tr>             <th>1.</th>             <td>Jerry</td>         </tr>         <tr>             <th>2.</th>             <td>Ferry</td>         </tr>     </tbody> </table></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p><strong>table标签的主要属性:</strong></p> <ul class=" list-paddingleft-2"> <li><p><strong>border</strong>     表格边框</p></li> <li><p><strong>align</strong>      水平对齐方式</p></li> <li><p><strong>bgcolor</strong>    背景颜色</p></li> <li><p><strong>cellpadding</strong> 内边距,单元格与内容之间的距离</p></li> <li><p><strong>cellspacing</strong> 外边距,单元格的间距,设置为0时,表格变为实线表格</p></li> <li><p><strong>width</strong> 表格的宽度,可以用%或者像素,最好通过css来设置长宽</p></li> </ul> <p><strong><caption></strong> 表格的标题<br><strong><tr></strong> 表格的行<br><strong><th></strong> 表格的表头名称,与<td>不同在于文字采用加粗居中的形式显示<br><strong><td></strong> 单元格,用来显示表格内容<br><strong><thead></strong> 表格头部,使结构更加分明<br><strong><tbody></strong> 表格主体部分,使结构更加分明<br><strong>rowspan</strong> 单元格竖跨多少行,作用在th或者td上<br><strong>colspan</strong> 单元格横跨多少列(即合并单元格),作用在th或者td上。(即横跨、竖跨都是作用在th或td上)</p> <h3>8.<form>表单标签</h3> <p><strong>表单属性</strong><br>HTML 表单用于接收不同类型的用户输入,用户提交表单时向服务器传输数据,从而实现用户与Web服务器的交互。<br>属性:action、method、enctype</p> <ul class=" list-paddingleft-2"> <li><p><strong><em>action</em></strong> 表单要提交的地址,用于处理表单的内容(一般是提交到后台的一个接口,这个接口可以是java写成的,提交到这个接口后后台就知道如何处理这些数据了)。</p></li> <li><p><strong><em>method</em></strong>  提交的方法,默认是get方式提交。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p><strong>get</strong>:1.提交的键值对显示在地址栏url后面; 2.安全性相对较差; 3.对提交内容的长度有限制</p></li> <li><p><strong>post</strong>:1.提交的键值对不显示在地址栏; 2.安全性相对较高; 3.对提交内容的长度理论上无限制</p></li> </ul> <li><p><strong><em>enctype</em></strong> 对表单数据进行编码</p></li> </ul> <p><strong>表单元素</strong><br><input> type属性可能的值:</p> <ul class=" list-paddingleft-2"> <li><p><strong><em>text</em></strong> 文本框输入(type的默认类型)</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p><strong>autocomplete</strong>(自动完成输入的内容,要求表单元素要有name属性才有自动完成的效果,off表示自动完成不可用,on表示自动完成可用)</p></li> <li><p><strong>disabled</strong>(设置或者获取控件的状态,默认是false即可用,等于true时不可用,不能输入内容)</p></li> </ul> <li><p><strong><em>password</em></strong>密码框。(以下属性text和password共有)</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p><strong>size</strong>(指定表单元素的初始宽度。当type为text或password时,表单元素的大小以字符为单位,对于其他元素,宽度以像素为单位)</p></li> <li><p><strong>maxlength</strong>(type为text或password时,表示输入的最大字符数),有利于防止sql的注入攻击</p></li> <li><p><strong>readonly</strong>设置为只读状态</p></li> <li><p><strong>placeholder</strong>设置框内预置内容(灰色),焦点选中时消失</p></li> </ul> <li><p><strong><em>radio</em></strong> 单选按钮</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p><strong>name</strong>(将name的值设置为相同值,才表示一组数据,才能实现单选功能)</p></li> <li><p><strong>value</strong>(必须要写,提交到服务器的key值,实际开发过程中value一般是编号)</p></li> <li><p><strong>checked</strong>(设置是否被默认选中)</p></li> </ul> <li><p><strong><em>checkbox</em></strong>  复选框</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p><strong>name</strong>(将name的值设置为相同值,才表示一组数据,才能添加到同一value值列表并提交到服务器)</p></li> <li><p><strong>value</strong>(必须要写,提交到服务器的key值,实际开发过程中value一般是编号)</p></li> <li><p><strong>checked</strong>(设置是否被默认选中)</p></li> </ul> <li><p><strong><em>file</em></strong>  文件域,用于上传文件(不同的浏览器表现形式不同)</p></li> <li><p><strong><em>submit</em></strong>  提交按钮。用于提交表单。</p></li> <li><p><strong><em>reset</em></strong>  重置按钮。清空表单的输入,恢复到表单默认的状态。</p></li> <li><p><strong><em>button</em></strong>  普通按钮。一般结合javascript使用。</p></li> <li><p><strong><em>image</em></strong>  图片按钮,用来提交表单,与submit是一样的效果。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"><li><p>src(图片路径)</p></li></ul> <li><p><strong><em>hidden</em></strong>  隐藏字段。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"><li><p>value(隐藏的内容)</p></li></ul> <li><p><strong><em>color</em></strong>  颜色标签。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"><li><p>value 指定颜色值(采用#十六进制数表示)。</p></li></ul> <li><p><strong><em>date</em></strong>  日期。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"><li><p>value值指定默认的日期,格式为<strong><em>*-</em></strong>-*(年月日)。</p></li></ul> <li><p><strong><em>datetime-local</em></strong>  显示本地时间</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"><li><p>value值指定默认的时间,格式为2017-04-13T23:10:10(年月日T时分秒)。</p></li></ul> <li><p><strong><em>number</em></strong>  数字向上或者向下滑动。可以填数字然后向上或者向下选择不同的值。</p></li> <li><p><strong><em>range</em></strong>  滑动标签。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p>min(指定最小值)</p></li> <li><p>max(指定最大值)</p></li> <li><p>value(指定当前默认值)。</p></li> </ul> <li><p><strong><em>week</em></strong>  每年的周数。</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"><li><p>value指定哪一年第几周,格式为2017-W20(2017年第20周)。</p></li></ul> </ul> <p><textarea> 文本域标签。默认表现形式是可以输入很多行文本的文本框。</p> <ul class=" list-paddingleft-2"> <li><p><strong>name</strong> 表单提交项的key</p></li> <li><p><strong>cols</strong> 设置文本域宽度</p></li> <li><p><strong>rows</strong> 设置文本域高度,即行数</p></li> </ul> <p><select> 下拉框标签。使用时要结合<option>子标签一起使用。</p> <ul class=" list-paddingleft-2"> <li><p><strong>name</strong> 表单提交项的key</p></li> <li><p><strong>size</strong> 选项个数</p></li> <li><p><strong>multiple</strong> 多选</p></li> <li><p><strong><option></strong> 下拉选中的每一项</p></li> <ul class=" list-paddingleft-2" style="list-style-type: square;"> <li><p>value(表单提交项的值)</p></li> <li><p>selected(selected下拉项默认被选中)</p></li> </ul> <li><p><strong><optgroup></strong> 为同类项加上分组</p></li> </ul> <p><label> 把元素与文本结合起来<br>友好设计:不只是选中复选框才能选中并打钩,要求点击对应的文字也能选中该复选框。<br>这种情况下要用到<label>标签的for属性(设置或获取给定标签对象指定到的对象,值=另一个元素的id号即可)</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><label for="name">姓名</label> <input id="name" type="text"></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p><fieldset> 对表单中的相关元素进行分组</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><fieldset>     <legend>温馨提示</legend>     <p align="middle">不要忘记点赞哦 ==</p> </fieldset></pre><div class="contentsignin">Copy after login</div></div><div class="contentsignin">Copy after login</div></div> <p>value: 表单提交项的值<br>对于不同的输入类型,value 属性的用法也不同:</p> <ul class=" list-paddingleft-2"> <li><p>type="button", "reset", "submit" - 定义按钮上的显示的文本</p></li> <li><p>type="text", "password", "hidden" - 定义输入字段的初始值</p></li> <li><p>type="checkbox", "radio", "image" - 定义与输入相关联的值</p></li> </ul> <p class="comments-box-content"><br></p> </li> </ul> </li> </ul><p>The above is the detailed content of HTML基础内容详解. For more information, please follow other related articles on the PHP Chinese website!</p> </div> </div> <div style="height: 25px;"> <div class="wzconBq" style="display: inline-flex;"> <span>Related labels:</span> <div class="wzcbqd"> <a onclick="hits_log(2,'www',this);" href-data="https://www.php.cn/search?word=html" target="_blank">html</a> </div> </div> <div style="display: inline-flex;float: right; color:#333333;">source:php.cn</div> </div> <div class="wzconOtherwz"> <a href="https://www.php.cn/faq/360361.html" title="Html case code to realize the report effect of dynamically displaying color blocks"> <span>Previous article:Html case code to realize the report effect of dynamically displaying color blocks</span> </a> <a href="https://www.php.cn/faq/360398.html" title="HTML forms and input"> <span>Next article:HTML forms and input</span> </a> </div> <div class="wzconShengming"> <div class="bzsmdiv">Statement of this Website</div> <div>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</div> </div> <div class="wwads-cn wwads-horizontal" data-id="156" style="max-width:955px"></div> <div class="wzconZzwz"> <div class="wzconZzwztitle">Latest Articles by Author</div> <ul> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="https://www.php.cn/faq/375959.html">How to add elements to php array</a> </div> <div>2023-03-14 15:58:02</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="https://www.php.cn/faq/377752.html">Example showing JS implementing a simple multiple-choice assessment system</a> </div> <div>1970-01-01 08:00:00</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="https://www.php.cn/faq/376780.html">PHP solution to restrict multiple submissions of the same IP</a> </div> <div>2023-03-15 07:38:01</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="https://www.php.cn/faq/362217.html">Using regular expressions to implement form validation in HTML</a> </div> <div>1970-01-01 08:00:00</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="https://www.php.cn/faq/379000.html">Detailed explanation of this pointing issue in JavaScript strict mode</a> </div> <div>1970-01-01 08:00:00</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="https://www.php.cn/faq/377851.html">Example code for building a tree menu (including multi-level menu) in Java</a> </div> <div>1970-01-01 08:00:00</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="https://www.php.cn/faq/376633.html">Detailed explanation of examples of CSS3 implementing smooth transition when hover leaves</a> </div> <div>1970-01-01 08:00:00</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="https://www.php.cn/faq/370599.html">Swiper carousel image source code sharing analysis</a> </div> <div>1970-01-01 08:00:00</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="https://www.php.cn/faq/378766.html">Summarize and organize VsCode plug-ins</a> </div> <div>1970-01-01 08:00:00</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="https://www.php.cn/faq/373935.html">HttpUtils request tool class code</a> </div> <div>1970-01-01 08:00:00</div> </li> </ul> </div> <div class="wzconZzwz"> <div class="wzconZzwztitle">Latest Issues</div> <div class="wdsyContent"> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="https://www.php.cn/wenda/176403.html" target="_blank" title="PX automatic conversion to REM error" class="wdcdcTitle">PX automatic conversion to REM error</a> <a href="https://www.php.cn/wenda/176403.html" class="wdcdcCons"> <style>html {   font-size: calc(100vw / 3.75);      }...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-16 09:34:16</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>0</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>4687</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="https://www.php.cn/wenda/176396.html" target="_blank" title="The page suddenly cannot pull css or bootstrap" class="wdcdcTitle">The page suddenly cannot pull css or bootstrap</a> <a href="https://www.php.cn/wenda/176396.html" class="wdcdcCons">So I'm developing a page, I did part of it yesterday and it worked great, and today I cont...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 21:58:04</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>800</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="https://www.php.cn/wenda/176386.html" target="_blank" title="How to solve the mysterious white space at the bottom of the page in CSS" class="wdcdcTitle">How to solve the mysterious white space at the bottom of the page in CSS</a> <a href="https://www.php.cn/wenda/176386.html" class="wdcdcCons">I'm trying to build a simple webpage using Bootstrap and D3, but I don't know how to get r...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 20:22:15</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>454</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="https://www.php.cn/wenda/176383.html" target="_blank" title="How to use laravel components with livewire lazy placeholder" class="wdcdcTitle">How to use laravel components with livewire lazy placeholder</a> <a href="https://www.php.cn/wenda/176383.html" class="wdcdcCons">I want to add the skeleton of my laravel component inside a livewire3 placeholder What I h...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 20:02:10</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>2</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>543</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="https://www.php.cn/wenda/176364.html" target="_blank" title="Top-level method to replace a string with HTML code (generated from an array)" class="wdcdcTitle">Top-level method to replace a string with HTML code (generated from an array)</a> <a href="https://www.php.cn/wenda/176364.html" class="wdcdcCons">Given a string like this...$htmlPattern="Usernameis:#name#andusercompanyis#company#&q...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 17:40:41</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>2</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>410</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> </div> </div> <div class="wzconZt" > <div class="wzczt-title"> <div>Related Topics</div> <a href="https://www.php.cn/faq/zt" target="_blank">More> </a> </div> <div class="wzcttlist"> <ul> <li class="ul-li"> <a target="_blank" href="https://www.php.cn/faq/htmlbq"><img src="https://img.php.cn/upload/subject/202407/22/2024072214431586789.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="html copyright symbol" /> </a> <a target="_blank" href="https://www.php.cn/faq/htmlbq" class="title-a-spanl" title="html copyright symbol"><span>html copyright symbol</span> </a> </li> <li class="ul-li"> <a target="_blank" href="https://www.php.cn/faq/htmlzxbjq"><img src="https://img.php.cn/upload/subject/202407/22/2024072214403473154.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="html online editor" /> </a> <a target="_blank" href="https://www.php.cn/faq/htmlzxbjq" class="title-a-spanl" title="html online editor"><span>html online editor</span> </a> </li> <li class="ul-li"> <a target="_blank" href="https://www.php.cn/faq/htmlwyzz"><img src="https://img.php.cn/upload/subject/202407/22/2024072214275948120.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="html web page production" /> </a> <a target="_blank" href="https://www.php.cn/faq/htmlwyzz" class="title-a-spanl" title="html web page production"><span>html web page production</span> </a> </li> <li class="ul-li"> <a target="_blank" href="https://www.php.cn/faq/htmlkg"><img src="https://img.php.cn/upload/subject/202407/22/2024072214273274014.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="html space" /> </a> <a target="_blank" href="https://www.php.cn/faq/htmlkg" class="title-a-spanl" title="html space"><span>html space</span> </a> </li> <li class="ul-li"> <a target="_blank" href="https://www.php.cn/faq/htmlssm"><img src="https://img.php.cn/upload/subject/202407/22/2024072214210727109.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="what is html" /> </a> <a target="_blank" href="https://www.php.cn/faq/htmlssm" class="title-a-spanl" title="what is html"><span>what is html</span> </a> </li> <li class="ul-li"> <a target="_blank" href="https://www.php.cn/faq/htmlztdxzmsz"><img src="https://img.php.cn/upload/subject/202407/22/2024072214205132478.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="How to set html font size" /> </a> <a target="_blank" href="https://www.php.cn/faq/htmlztdxzmsz" class="title-a-spanl" title="How to set html font size"><span>How to set html font size</span> </a> </li> <li class="ul-li"> <a target="_blank" href="https://www.php.cn/faq/htmlztxt"><img src="https://img.php.cn/upload/subject/202407/22/2024072214125629445.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="html to txt" /> </a> <a target="_blank" href="https://www.php.cn/faq/htmlztxt" class="title-a-spanl" title="html to txt"><span>html to txt</span> </a> </li> <li class="ul-li"> <a target="_blank" href="https://www.php.cn/faq/htmlwbkdmzmx"><img src="https://img.php.cn/upload/subject/202407/22/2024072214120496282.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="How to write html text box code" /> </a> <a target="_blank" href="https://www.php.cn/faq/htmlwbkdmzmx" class="title-a-spanl" title="How to write html text box code"><span>How to write html text box code</span> </a> </li> </ul> </div> </div> </div> </div> <div class="phpwzright"> <div class="wzrOne"> <div class="wzroTitle">Popular Recommendations</div> <div class="wzroList"> <ul> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="What does url mean?" href="https://www.php.cn/faq/418772.html">What does url mean?</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="What does DOM mean?" href="https://www.php.cn/faq/414303.html">What does DOM mean?</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="How to change image size" href="https://www.php.cn/faq/414252.html">How to change image size</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="How to make font bold in HTML" href="https://www.php.cn/faq/414520.html">How to make font bold in HTML</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="How to set the size of html images" href="https://www.php.cn/faq/475145.html">How to set the size of html images</a> </div> </li> </ul> </div> </div> <script src="https://sw.php.cn/hezuo/cac1399ab368127f9b113b14eb3316d0.js" type="text/javascript"></script> <div class="wzrThree"> <div class="wzrthree-title"> <div>Popular Tutorials</div> <a target="_blank" href="https://www.php.cn/course.html">More> </a> </div> <div class="wzrthreelist swiper2"> <div class="wzrthreeTab swiper-wrapper"> <div class="check tabdiv swiper-slide" data-id="one">Related Tutorials <div></div></div> <div class="tabdiv swiper-slide" data-id="two">Popular Recommendations<div></div></div> <div class="tabdiv swiper-slide" data-id="three">Latest courses<div></div></div> </div> <ul class="one"> <li> <a target="_blank" href="https://www.php.cn/course/812.html" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/041/620debc3eab3f377.jpg" alt="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)"/> </a> <div class="wzrthree-right"> <a target="_blank" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" href="https://www.php.cn/course/812.html">The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)</a> <div class="wzrthreerb"> <div>1420573 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="812"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="https://www.php.cn/course/74.html" title="PHP introductory tutorial one: Learn PHP in one week" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/6253d1e28ef5c345.png" alt="PHP introductory tutorial one: Learn PHP in one week"/> </a> <div class="wzrthree-right"> <a target="_blank" title="PHP introductory tutorial one: Learn PHP in one week" href="https://www.php.cn/course/74.html">PHP introductory tutorial one: Learn PHP in one week</a> <div class="wzrthreerb"> <div>4263900 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="74"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="https://www.php.cn/course/286.html" title="JAVA Beginner's Video Tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a2bacfd9379.png" alt="JAVA Beginner's Video Tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="JAVA Beginner's Video Tutorial" href="https://www.php.cn/course/286.html">JAVA Beginner's Video Tutorial</a> <div class="wzrthreerb"> <div>2509603 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="286"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="https://www.php.cn/course/504.html" title="Little Turtle's zero-based introduction to learning Python video tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a67ce3a6655.png" alt="Little Turtle's zero-based introduction to learning Python video tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Little Turtle's zero-based introduction to learning Python video tutorial" href="https://www.php.cn/course/504.html">Little Turtle's zero-based introduction to learning Python video tutorial</a> <div class="wzrthreerb"> <div>505749 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="504"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="https://www.php.cn/course/2.html" title="PHP zero-based introductory tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/6253de27bc161468.png" alt="PHP zero-based introductory tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="PHP zero-based introductory tutorial" href="https://www.php.cn/course/2.html">PHP zero-based introductory tutorial</a> <div class="wzrthreerb"> <div>860836 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="2"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> </ul> <ul class="two" style="display: none;"> <li> <a target="_blank" href="https://www.php.cn/course/812.html" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/041/620debc3eab3f377.jpg" alt="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)"/> </a> <div class="wzrthree-right"> <a target="_blank" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" href="https://www.php.cn/course/812.html">The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)</a> <div class="wzrthreerb"> <div >1420573 times of learning</div> <div class="courseICollection" data-id="812"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="https://www.php.cn/course/286.html" title="JAVA Beginner's Video Tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a2bacfd9379.png" alt="JAVA Beginner's Video Tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="JAVA Beginner's Video Tutorial" href="https://www.php.cn/course/286.html">JAVA Beginner's Video Tutorial</a> <div class="wzrthreerb"> <div >2509603 times of learning</div> <div class="courseICollection" data-id="286"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="https://www.php.cn/course/504.html" title="Little Turtle's zero-based introduction to learning Python video tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a67ce3a6655.png" alt="Little Turtle's zero-based introduction to learning Python video tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Little Turtle's zero-based introduction to learning Python video tutorial" href="https://www.php.cn/course/504.html">Little Turtle's zero-based introduction to learning Python video tutorial</a> <div class="wzrthreerb"> <div >505749 times of learning</div> <div class="courseICollection" data-id="504"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="https://www.php.cn/course/901.html" title="Quick introduction to web front-end development" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/64be28a53a4f6310.png" alt="Quick introduction to web front-end development"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Quick introduction to web front-end development" href="https://www.php.cn/course/901.html">Quick introduction to web front-end development</a> <div class="wzrthreerb"> <div >215572 times of learning</div> <div class="courseICollection" data-id="901"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="https://www.php.cn/course/234.html" title="Master PS video tutorials from scratch" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62611f57ed0d4840.jpg" alt="Master PS video tutorials from scratch"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Master PS video tutorials from scratch" href="https://www.php.cn/course/234.html">Master PS video tutorials from scratch</a> <div class="wzrthreerb"> <div >885041 times of learning</div> <div class="courseICollection" data-id="234"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> </ul> <ul class="three" style="display: none;"> <li> <a target="_blank" href="https://www.php.cn/course/1648.html" title="[Web front-end] Node.js quick start" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/662b5d34ba7c0227.png" alt="[Web front-end] Node.js quick start"/> </a> <div class="wzrthree-right"> <a target="_blank" title="[Web front-end] Node.js quick start" href="https://www.php.cn/course/1648.html">[Web front-end] Node.js quick start</a> <div class="wzrthreerb"> <div >7094 times of learning</div> <div class="courseICollection" data-id="1648"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="https://www.php.cn/course/1647.html" title="Complete collection of foreign web development full-stack courses" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/6628cc96e310c937.png" alt="Complete collection of foreign web development full-stack courses"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Complete collection of foreign web development full-stack courses" href="https://www.php.cn/course/1647.html">Complete collection of foreign web development full-stack courses</a> <div class="wzrthreerb"> <div >5510 times of learning</div> <div class="courseICollection" data-id="1647"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="https://www.php.cn/course/1646.html" title="Go language practical GraphQL" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/662221173504a436.png" alt="Go language practical GraphQL"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Go language practical GraphQL" href="https://www.php.cn/course/1646.html">Go language practical GraphQL</a> <div class="wzrthreerb"> <div >4645 times of learning</div> <div class="courseICollection" data-id="1646"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="https://www.php.cn/course/1645.html" title="550W fan master learns JavaScript from scratch step by step" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/662077e163124646.png" alt="550W fan master learns JavaScript from scratch step by step"/> </a> <div class="wzrthree-right"> <a target="_blank" title="550W fan master learns JavaScript from scratch step by step" href="https://www.php.cn/course/1645.html">550W fan master learns JavaScript from scratch step by step</a> <div class="wzrthreerb"> <div >667 times of learning</div> <div class="courseICollection" data-id="1645"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="https://www.php.cn/course/1644.html" title="Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/6616418ca80b8916.png" alt="Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours" href="https://www.php.cn/course/1644.html">Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours</a> <div class="wzrthreerb"> <div >23475 times of learning</div> <div class="courseICollection" data-id="1644"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> </ul> </div> <script> var mySwiper = new Swiper('.swiper2', { autoplay: false,//可选选项,自动滑动 slidesPerView : 'auto', }) $('.wzrthreeTab>div').click(function(e){ $('.wzrthreeTab>div').removeClass('check') $(this).addClass('check') $('.wzrthreelist>ul').css('display','none') $('.'+e.currentTarget.dataset.id).show() }) </script> </div> <div class="wzrFour"> <div class="wzrfour-title"> <div>Latest Downloads</div> <a href="https://www.php.cn/xiazai">More> </a> </div> <script> $(document).ready(function(){ var sjyx_banSwiper = new Swiper(".sjyx_banSwiperwz",{ speed:1000, autoplay:{ delay:3500, disableOnInteraction: false, }, pagination:{ el:'.sjyx_banSwiperwz .swiper-pagination', clickable :false, }, loop:true }) }) </script> <div class="wzrfourList swiper3"> <div class="wzrfourlTab swiper-wrapper"> <div class="check swiper-slide" data-id="onef">Web Effects <div></div></div> <div class="swiper-slide" data-id="twof">Website Source Code<div></div></div> <div class="swiper-slide" data-id="threef">Website Materials<div></div></div> <div class="swiper-slide" data-id="fourf">Front End Template<div></div></div> </div> <ul class="onef"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="jQuery enterprise message form contact code" href="https://www.php.cn/toolset/js-special-effects/8071">[form button] jQuery enterprise message form contact code</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="HTML5 MP3 music box playback effects" href="https://www.php.cn/toolset/js-special-effects/8070">[Player special effects] HTML5 MP3 music box playback effects</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="HTML5 cool particle animation navigation menu special effects" href="https://www.php.cn/toolset/js-special-effects/8069">[Menu navigation] HTML5 cool particle animation navigation menu special effects</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="jQuery visual form drag and drop editing code" href="https://www.php.cn/toolset/js-special-effects/8068">[form button] jQuery visual form drag and drop editing code</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="VUE.JS imitation Kugou music player code" href="https://www.php.cn/toolset/js-special-effects/8067">[Player special effects] VUE.JS imitation Kugou music player code</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="Classic html5 pushing box game" href="https://www.php.cn/toolset/js-special-effects/8066">[html5 special effects] Classic html5 pushing box game</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="jQuery scrolling to add or reduce image effects" href="https://www.php.cn/toolset/js-special-effects/8065">[Picture special effects] jQuery scrolling to add or reduce image effects</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="CSS3 personal album cover hover zoom effect" href="https://www.php.cn/toolset/js-special-effects/8064">[Photo album effects] CSS3 personal album cover hover zoom effect</a> </div> </li> </ul> <ul class="twof" style="display:none"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8328" title="Home Decor Cleaning and Repair Service Company Website Template" target="_blank">[Front-end template] Home Decor Cleaning and Repair Service Company Website Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8327" title="Fresh color personal resume guide page template" target="_blank">[Front-end template] Fresh color personal resume guide page template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8326" title="Designer Creative Job Resume Web Template" target="_blank">[Front-end template] Designer Creative Job Resume Web Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8325" title="Modern engineering construction company website template" target="_blank">[Front-end template] Modern engineering construction company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8324" title="Responsive HTML5 template for educational service institutions" target="_blank">[Front-end template] Responsive HTML5 template for educational service institutions</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8323" title="Online e-book store mall website template" target="_blank">[Front-end template] Online e-book store mall website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8322" title="IT technology solves Internet company website template" target="_blank">[Front-end template] IT technology solves Internet company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8321" title="Purple style foreign exchange trading service website template" target="_blank">[Front-end template] Purple style foreign exchange trading service website template</a> </div> </li> </ul> <ul class="threef" style="display:none"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-materials/3078" target="_blank" title="Cute summer elements vector material (EPS PNG)">[PNG material] Cute summer elements vector material (EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-materials/3077" target="_blank" title="Four red 2023 graduation badges vector material (AI EPS PNG)">[PNG material] Four red 2023 graduation badges vector material (AI EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-materials/3076" target="_blank" title="Singing bird and cart filled with flowers design spring banner vector material (AI EPS)">[banner picture] Singing bird and cart filled with flowers design spring banner vector material (AI EPS)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-materials/3075" target="_blank" title="Golden graduation cap vector material (EPS PNG)">[PNG material] Golden graduation cap vector material (EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-materials/3074" target="_blank" title="Black and white style mountain icon vector material (EPS PNG)">[PNG material] Black and white style mountain icon vector material (EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-materials/3073" target="_blank" title="Superhero silhouette vector material (EPS PNG) with different color cloaks and different poses">[PNG material] Superhero silhouette vector material (EPS PNG) with different color cloaks and different poses</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-materials/3072" target="_blank" title="Flat style Arbor Day banner vector material (AI+EPS)">[banner picture] Flat style Arbor Day banner vector material (AI+EPS)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-materials/3071" target="_blank" title="Nine comic-style exploding chat bubbles vector material (EPS+PNG)">[PNG material] Nine comic-style exploding chat bubbles vector material (EPS+PNG)</a> </div> </li> </ul> <ul class="fourf" style="display:none"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8328" target="_blank" title="Home Decor Cleaning and Repair Service Company Website Template">[Front-end template] Home Decor Cleaning and Repair Service Company Website Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8327" target="_blank" title="Fresh color personal resume guide page template">[Front-end template] Fresh color personal resume guide page template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8326" target="_blank" title="Designer Creative Job Resume Web Template">[Front-end template] Designer Creative Job Resume Web Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8325" target="_blank" title="Modern engineering construction company website template">[Front-end template] Modern engineering construction company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8324" target="_blank" title="Responsive HTML5 template for educational service institutions">[Front-end template] Responsive HTML5 template for educational service institutions</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8323" target="_blank" title="Online e-book store mall website template">[Front-end template] Online e-book store mall website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8322" target="_blank" title="IT technology solves Internet company website template">[Front-end template] IT technology solves Internet company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="https://www.php.cn/toolset/website-source-code/8321" target="_blank" title="Purple style foreign exchange trading service website template">[Front-end template] Purple style foreign exchange trading service website template</a> </div> </li> </ul> </div> <script> var mySwiper = new Swiper('.swiper3', { autoplay: false,//可选选项,自动滑动 slidesPerView : 'auto', }) $('.wzrfourlTab>div').click(function(e){ $('.wzrfourlTab>div').removeClass('check') $(this).addClass('check') $('.wzrfourList>ul').css('display','none') $('.'+e.currentTarget.dataset.id).show() }) </script> </div> </div> </div> <footer> <div class="footer"> <div class="footertop"> <img src="/static/imghw/logo.png" alt=""> <p>Public welfare online PHP training,Help PHP learners grow quickly!</p> </div> <div class="footermid"> <a href="https://www.php.cn/about/us.html">About us</a> <a href="https://www.php.cn/about/disclaimer.html">Disclaimer</a> <a href="https://www.php.cn/update/article_0_1.html">Sitemap</a> </div> <div class="footerbottom"> <p> © php.cn All rights reserved </p> </div> </div> </footer> <input type="hidden" id="verifycode" value="/captcha.html"> <script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script> <script src="/static/js/common_new.js"></script> <script type="text/javascript" src="/static/js/jquery.cookie.js?1732493731"></script> <script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script> <link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all'/> <script type='text/javascript' src='/static/js/viewer.min.js?1'></script> <script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script> <script type="text/javascript" src="/static/js/global.min.js?5.5.53"></script> </body> </html>