HTML的基本格式:
<!DOCTYPE html>
<html lang="en">
<head>
<meat charset="UTF-8">
<title> </title>
</head>
<body>
</body>
</html>
<h1></h1>
<p></p>
</br>
</hr>
<img src="图片路径" width="宽度" height="高度" alt="当路径无效,则输出本段内容" title="悬停显示内容>
超链接相关:
<a href="URL地址">文字</a>
<a href="URL地址"><img src="图片路径"></a>
<a href="URL地址" target="_blank">文字</a>
<base target="_blank">
<a href="URL地址" target="_self">文字</a>
<base target="_self">
<a href="网页路径">网页的名称</a>
<a href = "URL地址" title="显示内容">文字</a>
<a href="URL地址#xxx">文字</a>
<h id="xxx">标签名</h>
<a href="#xxx">文字</a>
<h id="xxx">标签名</h>
列表相关:
<ul>
<li></li>
</ul>
<ol>
<li></li>
</ol>
<dl>
<dt></dt>
<dd></dd>
</dl>
<select>
<optgroup lable="分组名称">
<option>列表数据</option>
</optgroup>
</select>
表格相关:
<table bgcolor="bleak" border="1" cellspacing="1px" width="px" height="px" alijn="center">
<caption>标题居中</caption>
//表头
<thead>
//tr:行 td:列 th:加粗的列
<tr bgcolor="white">
<td></td>
<th></th>
</tr>
</thead>
//表单
<tbody>
</tbody>
</table>
<td colspan="x"></td> 水平合并
<td rowspan="x"></td> 垂直合并
表单标签相关:
<from>
<表单元素>
</from>
type
属性相关方法:
value
设置默认值:
- 禁止用户输入:
disable
:禁用输入框readonly
:只读输入框
- 换行输入框
<textarea clos="宽度" rows="高度">
默认内容
</textarea>
<from>
<lable for="xxx">文字</lable><input type="text" id="xxx">
</from>
<from>
<fieldset>
<legend>边框内容</legend>
框内内容
</fieldset>
</from>
选择框相关:
<from>
<input type="radio" name="xxx" checked="checked">文字 //checked 仅能单个默认选项
</from>
<from>
<input type="checkbox" checked="checked">文字 //checked 可多个默认选项
</from>
<input type="text" list="xxx">
<datalist id="xxx">
<option>待选内容</option>
<option>待选内容</option>
</datalist>
按钮相关:
<from>
<input type="button" value="按钮名" onclick="alert (显示内容)">
</from>
<from>
<input type="image" src="图片地址" onclick="alert (显示内容)">
</from>
<from>
<input type="reset" value="按钮名">
</from>
<from>
<input type="submit">
</from>
<from>
<input type="submit" required>
</from>
<from>
<input type="hidden" name="xxx" value="xxx">
</from>
  空格符号
© 版权符号
< 小于符号
> 大于符号
代替被遗弃的标签:
<strong>文字</strong>
<ins>文字</ins>
<em>文字</em>
<del>文字</del>