html注释
<!-- --> 快捷键:ctrl+/
头部属性
DOCTYPE:告诉浏览器用什么规范
meta:描述网站信息
charset:字符集
<!-- 告诉搜索引擎网站关键信息,便于搜索 -->
<meta name="keywords" content="关键字">
<meta name="description" content="描述">
基本属性
<strong></strong> 粗体
<em></em> 斜体
空格
> >
< <
© 版权符号
img标签
<img src="path" alt="text" title="text" width="x" height="y">
path:图像路径
alt:加载不出图片时的替代文字
title:鼠标悬浮时的提示文字
width:宽度
height:高度
a标签
<a href="path" target="_blank/_self" >文字或图像</a>
path:要跳转的路径
_blank:新网页打开
_self:当前网页打开(默认)
<!-- 锚标签,使用id标记页内跳转 -->
<a href="" id="top"></a>
<a href="#top"></a>
<!-- 跳转到name.html的top位置 -->
<a href="name.html #top"></a>
<!-- 跳转到邮箱 -->
<a href="mailto:12345667@qq.com"></a>
列表
<!-- 无序列表 -->
<ul>
<li></li>
</ul>
<!-- 有序列表 -->
<ol>
<li></li>
</ol>
<!-- 自定义列表 -->
<dl>
<dt>标题</dt>
<dd></dd>
</dl>
表格
<!-- border:边框宽度; tr:行; td:列-->
<table style="border: 1px;">
<tr>
<!-- 跨列 -->
<td colspan=""></td>
<!-- 跨行 -->
<td rowspan=""></td>
</tr>
</table>
媒体元素
<!-- 视频;controls:视频控制条,必须加视频才能播放 -->
<video src="" controls autoplay></video>
<!-- 音频;autoplay:自动播放 -->
<audio src="" controls autoplay></audio>
框架
<!-- 在hello里面打开链接 -->
<iframe src="path" frameborder="0" name="(框架名)hello"></iframe>
<a href="http://adasda" target="hello"></a>
表单
<!--
get:可以在url中看到自己的信息,高效,不安全,不能传输大文件
post:不会看到,比较安全,可以传输大文件
-->
<form method="post/get" action="result.html">
<!-- 文本、密码、提交、重置、按钮 -->
<!-- placeholder:提示信息;required:非空 -->
<input type="text" name="" id="" placeholder="提示信息" required>
<input type="password" name="" id="">
<input type="submit" name="" id="">
<input type="reset" name="" id="">
<input type="button" name="" id="">
<!-- 单选、复选; checked:默认选中 -->
<input type="radio" name="第一题" id="" checked>A
<input type="radio" name="第一题" id="">B
<input type="radio" name="第一题" id="">C
<input type="radio" name="第一题" id="">D
<input type="checkbox" name="" id="" checked>A
<input type="checkbox" name="" id="">B
<input type="checkbox" name="" id="">C
<input type="checkbox" name="" id="">D
<!-- 多行文本域 -->
<textarea name="" id="" cols="30" rows="10" maxlength=""></textarea>
<!-- 下拉框 默认第一个是selected,选中状态 -->
<select name="" id="">
<option value="" selected>A</option>
<option value="">B</option>
<option value="">C</option>
<option value="">D</option>
</select>
<!-- 按钮 -->
<input type="button" name="" id="">
<!-- 文件域:提交文件 -->
<input type="file" name="" id="">
<!-- 邮件、url、数字验证 -->
<input type="email" name="" id="">
<input type="url" name="" id="">
<input type="number" name="" id="" max="" min="" step="">
<!-- 滑块(调音量) -->
<input type="range" name="" id="" max="" min="" step="">
<!-- 搜索框 -->
<input type="search" name="" id="">
<!-- 标签域 -->
<label for="search">搜索</label>
<input type="search" name="" id="search">
</form>