1、网页基本格式:
<html>
<head>
<title>...</title>
<meta />
<link rel="stylesheet" href="xxx.css">
<script type="text/javascript" src="xxx.js"></script>
<script type="text/javascript">
...
</script>
</head>
<body>
...
</body>
</html>
2、常用标签
文本属性:
<font color="white" size="6" face="楷体"></font>
<b>加粗</b>
<strong>强调、加粗</strong>
<i>倾斜</i>
<em>强调、倾斜</em>
<u>下划线</u>
<ins>插入的是文本、下划线</ins>
<sup>上标</sup>
<sub>下标</sub>
<p>段落</p>
h1-h6标题【align=left、right、center】
<pre>预定义标签,保留原有空格、换行</pre>
<div>本身无意义,结合css使用,自己会独占一行,块标签</div>
<span>行内标签,不独占一行</span>
<!--注释内容-->
<ul><li></li></ul>无序标签【type=circle、disc、square】
<ol><li></li></ol>有序标签
特殊字符:
 :
©
<< >>
¥ ¥
图片标签:
<img src="" width="" height="" border="" alt="" hspace="与内容左右之间的距离" vspace="与内容上下之间的距离"/>
表格:
<table bgcolor="red" background="图片地址【不能含有中文,优先级高于颜色】">
行<tr rowspan="竖向合并">
列<td colspan="横向合并"></td>
</tr>
</table>
链接:
<a href="" target="_blank\_self">...</a>
定义锚点--
<标签 name="xx"></标签>
<a href="#xx">跳转到锚点标签</a>
表单:
<form name="xxx" action="xxx.jsp" method="get\post">
单行文本框<input type="text" size="" MaxLength="" value="" name="" placeholder="文本框内默认灰色小字" required="required【必填,否则无法提交】" autofocus="autofocus【自动定位焦点】" />
密码框<input type="password" size="" MaxLength="" value="" name="" readonly="readonly" disabled="disabled【不难选中不难更改】"/>
单选框<input type="radio" value="初始值必写" name="单选按钮组名要相同" />
复选框<input type="checkbox" value="初始值必写" name="多选按钮组名要相同" checked="checked【默认被选中】" />
多行文本框<textarea rows="" cols="" name="">默认内容</textarea>
下拉列表<select><option value="" name=""></option> <option value="" name=""></option></select>
隐藏域<input type="hidden" name="" value="" />
文件域【不可写value的值】<input type="file" name="" />
按钮
<input type="submit" value="提交" />
<input type="reset" value="重置" />
<input type="button" value="xxx" οnclick="xxx()" />
<input type="image" src="图片按钮图片的地址" />
html5新增表单属性:email【email类型】 url【网络地址】 date month time week number【数字类型】 search【搜索框】 color【颜色选项】 ranger【滑块】
</form>
html5新增标签:
nav【网页导航链接的一行文本】 section【类似div】 article【网页文章内容】 aside【网页文档的侧边栏】 footer 【网页的页脚,如版权】