html标题 <h1>This is a heading</h1> 标题分为h1-6
html头部 <head>This is a header</head>
html段落 <p>This is a paragraph.</p>
html链接 <a href="http://www.w3school.com.cn" target="_blank">This is a link</a> target="_blank" 在新窗口中打开
html图片 <img src="w3school.jpg" width="104" height="142" alt="图片" /> alt="图片" 添加文本注释
html换行 <br />
<base> 标签为页面上的所有链接规定默认地址或默认目标(target) <base href="http://www.w3school.com.cn/images/" /> <base target="_blank" />
<link> 标签定义文档与外部资源之间的关系 <link rel="stylesheet" type="text/css" href="mystyle.css" />
<style> 标签用于为 HTML 文档定义样式信息
<style type="text/css"> body {background-color:yellow} p {color:blue} </style>
<meta> 标签提供关于 HTML 文档的元数据,始终位于 head 元素中 <meta name="keywords" content="HTML, CSS, XML" />
<script> 标签用于定义客户端脚本
form表单 <form>form表单</form> 输入 <input type="text" name="input"> 单选按钮 <input type="radio" name="sex" value="female">Female
提交 <input type="text" name="lastname" value="Mouse"> method属性 <form action="action_page.php" method="GET"> 下拉列表 <select name="cars"></select>
下拉列表选项 <option value="audi">Audi</option> 按钮 <button type="button" onclick="alert('Hello World!')">Click Me!</button>
定义在提交表单时执行的动作 <form action="action_page.php"> <datalist> 元素为 <input> 元素规定预定义选项列表
input类型 密码 <input type="password"> 勾选 <input type="checkbox" name="vehicle" value="Car">I have a car 数字 <input type="number" name="quantity" min="1" max="5>
日期 <input type="date" name="bday"> 颜色 <input type="color" name="favcolor"> 范围 <input type="range" name="points" min="0" max="10">
选择月份和年份 <input type="month" name="bdaymonth"> 选择周和年 <input type="week" name="week_year">
选择时间 <input type="time" name="usr_time"> 择日期和时间 <input type="datetime" name="bdaytime"> 选择日期和时间 <input type="datetime-local" name="bdaytime">
输入电子邮件 <input type="email" name="email"> 输入搜索字段 <input type="search" name="googlesearch"> 输入电话号码 <input type="tel" name="usrtel">
输入url <input type="url" name="homepage">
属性 value 属性规定输入字段的初始值,readonly 属性规定输入字段为只读,disabled 属性规定输入字段是禁用的,size 属性规定输入字段的尺寸,maxlength 属性规定输入字段允许的最大长度
无序列表 <ul>始于</ul>,<li>列表项始于</li>
有序列表 <ol>始于</ol>,<li>列表项始于</li>
定义列表 <dl>始于</dl>,<dt>列表项始于</dt>,<dd>自定义列表项的定义</dd>
属性总是在 HTML 元素的开始标签中规定。
<table>表格</table>,<tr>表格中的行</tr>,<td>表格中的列</td>,<caption>表格标题</caption>,<hr>表格的表头</hr>,<thead>表格的页眉</thead>,<tbody>表格的主体<tbody>,<tfoot>表格的页脚</tfoot>,<col>表格列的属性</col>,<colgroup>表格列的组<colgroup>
一些常用的 HTML DOM 方法: getElementById(id) - 获取带有指定 id 的节点(元素) appendChild(node) - 插入新的子节点(元素) removeChild(node) - 删除子节点(元素) 一些常用的 HTML DOM 属性: innerHTML - 节点(元素)的文本值 parentNode - 节点(元素)的父节点 childNodes - 节点(元素)的子节点 attributes - 节点(元素)的属性节点
浙公网安备 33010602011771号