HTML
时间:2020-03-05 13:10:36
收藏:0
阅读:83
- 一.操作思想
- 使用标签把要操作的数据包起来,通过修改标签的属性值,实现标签内数据样式的变化?
- 二.font标签
- 属性 size
取值范围1-7 - 属性 color
英文单词 或 十六进制书(如#ffffff是白色)?
- 属性 size
- 三.标题标签
- <h1></h1>......<h6></h6>
从h1到h6越来越小,自动换行?
- <h1></h1>......<h6></h6>
- 四.注释
- <!-- html的注释 -->
- 五.列表标签
- 自定义
<dl>? <dt></dt>? <dd></dd> ?</dl> - 有序
<ol>? <li></li> ?</ol> - 无序
<ul>? <li></li> ?<ul>
- 自定义
- 六.图像标签
- <img src="图片的路径" width=“” height=“” />
alt,浏览器兼容性很差
- <img src="图片的路径" width=“” height=“” />
- 七.路径(相对路径)
- 在同一级目录下--直接写
- 在下一级目录--images/1.jpg
- 在上层目录--../
- 八.超链接标签
- <a href="路径">显示在页面上的内容</a>
打开方式--targer="_self _blank";默认是在当前页面打开
- <a href="路径">显示在页面上的内容</a>
- 九.表格标签
<table> <tr>? <td></td> <th></th>? //th和td差不多,但是可以加粗居中 </tr>??</table>? - 十.表单标签
- <form>...</form>
- action:提交到的目标地址
- method:提交方式
常用的有get和post,他们的区别是:...... - enctype:上传的时候使用
- 输入项
- 下拉框
<select name=""> <option value=""></option>?</select>?- onchange:改变内容(一般和select一起使用
- 按钮
<button> </button> - 文本域
<textarea cols="" rows="" name=""></textarea> - 普通输入项 <input type="text"/>
method---提交表单所用的 HTTP 方法,readonly---规定输入字段为只读,action---提交的目标地址- type属性
range,text,url,data,color,month,number,image等- 单选框 radio;多选框 checkbox;按钮 botton
- 提交 submit;密码 password;查询 search
- 隐藏项 type="hidden"
- value---规定输入字段的初始值,
- onclick:鼠标点击事件
- name,disable,size,maxlength 等
- type属性
- 下拉框
- 表单提交的方式
- 使用属性type=submit提交
<input type="submit" /> - 使用button提交
<input type="button" value="提交" onclick=form1() />?? function form1() { //获取form var form1 = document.getElementById("form1"); //设置action form1.action = "hello.html"; //提交form表单 form1.submit(); } - 使用超链接提交
<a href="hello.html?username=123456">使用超链接提交</a>
- 使用属性type=submit提交
- <form>...</form>
- 十一.div和span
- 十二.框架标签(会用)
<frameset rows="80,*"> //把页面划分成上下两部分? <frame name="top" src="a.html">? //上面的页面? <frameset cols="150,*"> //把下面部分划分左右两部分 ?<frame name="lower_left" src="b.html"> //左边的页面 <frame name="lower_right" src="c.html"> //右边的页面??? </frameset>?</frameset>?- <frameset>
- row:按照行进行划分
- cols:按照列进行划分
- <frame>
- 具体显示的页面
- <frameset>
原文:https://www.cnblogs.com/margot921/p/12419277.html
评论(0)