html5

基础结构

html 复制代码
<!--声明为html5-->
<!DOCTYPE html>
<html>
<head>
    <!--设置编码方式-->
    <meta charset="UTF-8">
    <!--移动端设置-->
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0">
    <title>base</title>
    <!--引入外部资源-->
    <link rel="stylesheet" href="../css/main.css">
    <script src="../css/main.js"></script>
</head>
<body>
<!--内容区-->
<form></form>
<!--脚本区-->
<script></script>
</body>
</html>

块级标签:独占一行

html 复制代码
<div>div</div>
<p>段落一</p>
<h1>一级标题</h1>
<h6>六级标题</h6>
<ol>有序列表
    <li>项目一</li>
    <li>项目二</li>
</ol>
<ul>无序列表
    <li>项目一</li>
    <li>项目二</li>
</ul>
<dl>自定义列表
    <dt>列表一</dt>
    <dd>dd1</dd>
    <dd>dd2</dd>
    <dt>列表二</dt>
    <dd>dd3</dd>
    <dd>dd4</dd>
</dl>

行内标签:不能独占一行,不能设置宽高属性

html 复制代码
<a href="http://www.baidu.com">百度</a>
<span>span1</span>
<strong>strong1</strong>

行内块级标签:不能独占一行,可以设置宽高属性

html 复制代码
<br/>
<imgsrc="../img/demo.jpg" height="108" width="192"/>
<input>

块级标签与行内标签转换

html 复制代码
<div style="display: inline">块级转行内</div>
<span style="display: block">行内转块级</span>

表单标签

html 复制代码
<form action="" method="post"/>
    <input type="password"/>
    <input type="submit"/>
    <input type="button"/>
    <input type="date"/>
    <input type="reset"/>
    <input type="checkbox"/>
    <input type="radio"/>
    <select>
        <option></option>
    </select>
</form>

新表单标签

html 复制代码
<form id="form2">
	<input type="email"/>
	<input type="url"/>
	<input type="number" value="0" step="10"/>
	<input type="range"/>
	<input type="datetime-local"/>
	<input type="search"/>
	<input type="color"/>
	<input type="text" placeholder="姓名"/>
	<input type="submit" form="form2"></button>
</form>

表格标签

html 复制代码
<table border="1px" cellspacing="0px" cellpadding="10px">
    <tr>
        <td>td1</td>
        <td>td2</td>
    </tr>
    <tr>
        <td colspan="2">td3</td>
    </tr>
</table>

多媒体标签

html 复制代码
<!--音频-->
<audio controls>
	<source src="../static/demo.mp4">
</audio>
<!--视频-->
<video muted controls style="width: 500px;height: 300px;">
	<source src="../static/demo.mp4">
</video>
相关推荐
DarkBule_12 小时前
0成本get可信域名:dpdns.org公益域名获取全攻略
css·学习·html·github·html5
合作小小程序员小小店13 小时前
web网页开发,旧版在线%考试,判题%系统demo,基于python+flask+随机分配考试题目,基于开发语言python,数据库mysql
开发语言·后端·python·mysql·flask·html5
.生产的驴18 小时前
React 页面路由ReactRouter 路由跳转 参数传递 路由配置 嵌套路由
前端·javascript·react.js·前端框架·json·ecmascript·html5
嘀咕博客1 天前
h5游戏免费下载:HTML5拉杆子过关小游戏
前端·游戏·html5
南清的coding日记1 天前
Java 程序员的 Vue 指南 - Vue 万字速览(01)
java·开发语言·前端·javascript·vue.js·css3·html5
.生产的驴1 天前
React 模块化Axios封装请求 统一响应格式 请求统一处理
前端·javascript·react.js·前端框架·json·ecmascript·html5
simon_93492 天前
微信小程序(H5)上传文件到阿里云 OSS(使用 STS 临时凭证)
阿里云·微信小程序·小程序·html5
xhload3d4 天前
热力图可视化为何被广泛应用?| 图扑数字孪生
3d·html5·webgl·数字孪生·可视化·热力图·三维建模·轻量化·电力能源·空间热力图
合作小小程序员小小店4 天前
web开发,在线%蛋糕销售%管理系统,基于asp.net,webform,c#,sql server
开发语言·后端·asp.net·html5·教育电商
合作小小程序员小小店5 天前
web开发,在线%高校舆情分析%系统demo,基于python,flaskweb,echart,nlp,ida,tf-idf,多爬虫源,数据库mysql
人工智能·python·flask·html5·tf-idf