HTMl基础
link标签
1.引入图标
2.引入css文件
meta标签
属性:
charset:指定网页的字符集
name :指定的数据名称
content 指定的数据内容
keywords 标识网页的关键字
description :用于对网站的描述
<meta http-equiv="refresh" content="3;url=https://www.baidu.com" >
3表示3秒后,跳转到百度
自定义属性:
通过data-name='' 设置属性,通过dataset.name 获取属性或修改属性
例如:
<button data-mes="这是一个按钮">按钮 </button
<script>
const btn=document.querySelector ('button')
console.log(btn.dataset.mes) //获取属性值
</script>
table表格
<table>
<tr>
<th> </th>
<th> </th>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<table>
属性:cellspacing:单元格之间的距离, cellpadding:内容到边框的距离
rowspan:合并行,作用于td上,例如: 包含当前行向下选中,包含本身两个单元格行合并。
colspan:合并列,同样作用与td上,
align:表格对齐方式,valign :top /middle/bottom
完整表格:caption(标题) thead(表头),tbody(表体),tfoot(表尾)
通过css添加样式: border-spacing:指定边框之间的距离,0为边框相加
border-collapse:collapse //设置边框合并
如果使用了border-collapse:collapse,那么border-spacing就没效果了。
如果没有将tr写入tbody中,浏览器默认将tr放入tbody中
form
属性:action ; method: get/post input: 属性:type=text/number/password file (上传文件) disabled(失效,不会提交数据),required(必填),minlenth,maxlenth,placeholder,value,pattern(正则匹配) autocomplete: on/off 自动补全(一些提示信息),前提是提交过的填写的信息 autofocus自动获取焦点 联合button标签 属性:type 值 reset 重置 submit 提交