1. a 标签的用法
作用
- 跳转到外部页面
- 跳转到内部描点/页面
- 跳转到邮箱或者打电话
属性
- href超链接
- target在指定的窗口打开超链接
- dowload
- rel=noopener
a的href
- 网址
- htts://xxx.com
- http://xxx.com
- //xxx.com(一般直接用这个)
- 路径
- /a/b/c以及a/b/c
- index.html以及./index.html 2. img 标签的用法
作用
- 发出get请求,展示一张图片
属性
- alt可替换的
- height高(设置高或者宽其中一个图片会自适应)
- width宽 注:不能让图片变形!只写宽或者高
- src图片地址
-
`<style>` -
`*{margin:0;` padding:0;box-sizing:border-box;}-
`</style>` -
`<head>` <body><imgid=xxxheight="400"src="dog.png"alt="狗子"><script>xxx.onload=function(){-
`console.log("图片加载成功");` };xxx.onerror=function(){console.log("图片加载失败");};xxx.src="/404.png";-
`</script>` -
`</body>` </head>
事件
onload/onerror
响应式
max-width:100%
3. table 标签的用法
-
thead 头部
-
tbody身体
-
tfoot尾部
-
tr=table row
-
th表头内容
-
td内容 `
<tr> <th>1</th> <td></td> <td></td> </tr><tr> <th>1</th> <td></td> <td></td> </tr> <tfoot> <tr> <th>1</th> <td></td> <td></td> </tr> </tfoot>`
相关样式
- table-layout表格布局
- border-collapse:collapse;合并
- border-spacing:0;表格无空隙
- 其他感想
- frm标签
- 发出get或者post请求,然后刷新页面